wolfstudy commented on pull request #703:
URL: https://github.com/apache/pulsar-client-go/pull/703#issuecomment-1010697007
@cckellogg Choose to reuse the current code logic for processing. When
receiving the CommandCloseProducer or CommandCloseConsumer cmd, set the current
connection state to `connectionClosed`, and then delete the connection in the
closed state through the following check-in `GetConnection()`.
```
if conn.closed() {
delete(p.connections, key)
p.log.Infof("Removed connection from pool key=%s
logical_addr=%+v physical_addr=%+v",
key, conn.logicalAddr, conn.physicalAddr)
conn = nil // set to nil so we create a new one
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]