Skip to content

Commit c2f2ca1

Browse files
committed
refactor(handler): skip error log on read failure when agent is closed
1 parent 3b7404f commit c2f2ca1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cluster/handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ func (h *LocalHandler) handle(conn net.Conn) {
224224
for {
225225
n, err := conn.Read(buf)
226226
if err != nil {
227+
if agt.status() == statusClosed {
228+
return
229+
}
227230
log.Error("Read message error, session will be closed immediately.", err)
228231
return
229232
}

0 commit comments

Comments
 (0)