Skip to content

Commit

Permalink
net: move OnConnClose before Swap (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
better0332 authored May 12, 2023
1 parent d0e6292 commit ea6ae2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/proxy/backend/backend_conn_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ func (mgr *BackendConnManager) Close() error {
}
mgr.wg.Wait()

handErr := mgr.handshakeHandler.OnConnClose(mgr)

var connErr error
var addr string
mgr.processLock.Lock()
Expand All @@ -642,8 +644,6 @@ func (mgr *BackendConnManager) Close() error {
}
mgr.processLock.Unlock()

handErr := mgr.handshakeHandler.OnConnClose(mgr)

eventReceiver := mgr.getEventReceiver()
if eventReceiver != nil {
// Notify the receiver if there's any event.
Expand Down

0 comments on commit ea6ae2e

Please sign in to comment.