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 742f1b1 commit bda4d40Copy full SHA for bda4d40
pulsar/internal/connection.go
@@ -843,7 +843,7 @@ func (c *connection) Close() {
843
c.Lock()
844
cnx := c.cnx
845
// do not use changeState() since they share the same lock
846
- c.setState(connectionClosed)
+ c.setState(connectionClosing)
847
c.cond.Broadcast()
848
c.Unlock()
849
@@ -853,6 +853,13 @@ func (c *connection) Close() {
853
854
close(c.closeCh)
855
856
+ c.Lock()
857
+ cnx := c.cnx
858
+ // do not use changeState() since they share the same lock
859
+ c.setState(connectionClosed)
860
+ c.cond.Broadcast()
861
+ c.Unlock()
862
+
863
listeners := make(map[uint64]ConnectionListener)
864
c.listenersLock.Lock()
865
for id, listener := range c.listeners {
0 commit comments