Skip to content

Commit c484d47

Browse files
committed
Fix log race
1 parent b54e815 commit c484d47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func (s *server) handlePeerConn(ctx context.Context, conn *peer.Conn) {
282282
for {
283283
channel, err := conn.Accept(ctx)
284284
if err != nil {
285-
if s.isClosed() {
285+
if errors.Is(err, peer.ErrClosed) || s.isClosed() {
286286
return
287287
}
288288
s.options.Logger.Debug(ctx, "accept channel from peer connection", slog.Error(err))

0 commit comments

Comments
 (0)