add chain group

This commit is contained in:
ginuerzh
2022-09-02 10:57:40 +08:00
parent 470d229c58
commit 9b695bc374
10 changed files with 145 additions and 77 deletions

View File

@ -100,11 +100,15 @@ func (h *forwardHandler) Handle(ctx context.Context, conn net.Conn, opts ...hand
log.Error(err)
// TODO: the router itself may be failed due to the failed node in the router,
// the dead marker may be a wrong operation.
target.Marker.Mark()
if marker := target.Marker(); marker != nil {
marker.Mark()
}
return err
}
defer cc.Close()
target.Marker.Reset()
if marker := target.Marker(); marker != nil {
marker.Reset()
}
t := time.Now()
log.Debugf("%s <-> %s", conn.RemoteAddr(), target.Addr)