We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32ab091 commit a108baaCopy full SHA for a108baa
data/txHandler.go
@@ -707,13 +707,16 @@ func (eic *erlIPClient) OnClose(f func()) {
707
// by adding a helper closer function to track connection closures
708
func (eic *erlIPClient) register(ec util.ErlClient) {
709
eic.m.Lock()
710
- defer eic.m.Unlock()
711
if _, has := eic.clients[ec]; has {
712
// this peer is known => noop
+ eic.m.Unlock()
713
return
714
}
715
eic.clients[ec] = struct{}{}
716
717
718
+ // Register the OnClose callback without holding eic.m to avoid
719
+ // lock ordering deadlock with wsPeer.closersMu
720
ec.OnClose(func() {
721
eic.connClosed(ec)
722
})
0 commit comments