cckellogg commented on a change in pull request #703:
URL: https://github.com/apache/pulsar-client-go/pull/703#discussion_r782392829
##########
File path: pulsar/internal/connection.go
##########
@@ -163,6 +163,9 @@ type connection struct {
consumerHandlersLock sync.RWMutex
consumerHandlers map[uint64]ConsumerHandler
+ reconnectFlagLock sync.Mutex
+ reconnectFlag bool
Review comment:
This variable is a little confusing to me. What is this flag suppose to
indicate? And if it's set is the connection in an unusable state?
##########
File path: pulsar/internal/connection_pool.go
##########
@@ -75,13 +75,15 @@ func (p *connectionPool) GetConnection(logicalAddr
*url.URL, physicalAddr *url.U
p.Lock()
conn, ok := p.connections[key]
if ok {
- p.log.Debugf("Found connection in pool key=%s logical_addr=%+v
physical_addr=%+v",
+ p.log.Infof("Found connection in pool key=%s logical_addr=%+v
physical_addr=%+v",
key, conn.logicalAddr, conn.physicalAddr)
- // remove stale/failed connection
- if conn.closed() {
+ // When the current connection is in a closed state or the
broker actively notifies that the
Review comment:
How does the broker notify that the connection is closed?
--
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]