Fix endpoint lifecycle ordering and device reconfiguration

This commit is contained in:
世界
2026-11-24 22:45:20 +08:00
parent 37fffa325b
commit 4913f787fb
11 changed files with 138 additions and 91 deletions
+4 -2
View File
@@ -627,8 +627,10 @@ func (s *ServerEndpoint) readLoop(ctx context.Context) {
err = s.device.WriteInboundBuffers(packetBuffers)
buf.ReleaseMulti(packetBuffers)
if err != nil {
s.logger.Error(E.Cause(err, "write packet to device"))
return
if E.IsCanceled(err) || ctx.Err() != nil {
return
}
s.logger.Debug(E.Cause(err, "write packet to device"))
}
}
}