Skip to content

Commit 55f7208

Browse files
committed
Lock on close wait
1 parent abd4b50 commit 55f7208

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

agent/agent.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ func (s *server) run(ctx context.Context) {
280280
s.run(ctx)
281281
return
282282
}
283+
s.closeMutex.Lock()
283284
s.connCloseWait.Add(1)
285+
s.closeMutex.Unlock()
284286
go s.handlePeerConn(ctx, conn)
285287
}
286288
}

0 commit comments

Comments
 (0)