现在已注册的节点会检查并更新 host;修复一个导致断开的连接没有正常退出的问题
This commit is contained in:
@@ -79,7 +79,6 @@ func ctrl(ctx context.Context, id int32, host string) error {
|
||||
var reader = bufio.NewReader(conn)
|
||||
|
||||
// 发送开启连接
|
||||
slog.Debug("发送节点连接命令")
|
||||
err = sendOpen(conn, id)
|
||||
if err != nil {
|
||||
return fmt.Errorf("发送节点信息失败: %w", err)
|
||||
@@ -108,7 +107,7 @@ func ctrl(ctx context.Context, id int32, host string) error {
|
||||
for {
|
||||
// 读取命令
|
||||
cmd, err := reader.ReadByte()
|
||||
if err := utils.WarpConnErr(err); err != nil {
|
||||
if ok, err := utils.WarpConnErr(err); !ok {
|
||||
errCh <- err
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user