Skip to content

Commit 72f5b4b

Browse files
Maxime Peimfujita
authored andcommitted
fix: remove logging on connection closing
The FSM handling of a TCP connection is pretty messy, and we always close multiple times the same TCP connection. Hence, there is always an error returned at the end of the fsm loop.
1 parent 719ce3c commit 72f5b4b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/server/fsm.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,10 +1997,7 @@ func (h *fsmHandler) loop(ctx context.Context, wg *sync.WaitGroup) {
19971997
default:
19981998
}
19991999
if fsm.conn != nil {
2000-
err := fsm.conn.Close()
2001-
if err != nil {
2002-
fsm.logger.Error("failed to close existing tcp connection", slog.String("State", oldState.String()))
2003-
}
2000+
fsm.conn.Close()
20042001
}
20052002
close(fsm.connCh)
20062003
cleanInfiniteChannel(fsm.outgoingCh)

0 commit comments

Comments
 (0)