Skip to content

Commit e624f23

Browse files
committed
before cnx.close, the stat need change to connectionClosing
1 parent 7ab9b4c commit e624f23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pulsar/internal/connection.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,13 +858,14 @@ func (c *connection) Close() {
858858
c.Lock()
859859
cnx := c.cnx
860860
c.Unlock()
861-
c.changeState(connectionClosed)
861+
c.changeState(connectionClosing)
862862

863863
if cnx != nil {
864864
_ = cnx.Close()
865865
}
866866

867867
close(c.closeCh)
868+
c.changeState(connectionClosed)
868869

869870
listeners := make(map[uint64]ConnectionListener)
870871
c.listenersLock.Lock()

0 commit comments

Comments
 (0)