Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] producer runEventsLoop for reconnect early exit #721

Merged
merged 10 commits into from
Feb 9, 2022
Next Next commit
Fix closed connection leak
  • Loading branch information
billowqiu committed Jan 21, 2022
commit e6163552c75bb34aacfffde062972a1e021c8e6b
1 change: 1 addition & 0 deletions pulsar/internal/connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (p *connectionPool) GetConnection(logicalAddr *url.URL, physicalAddr *url.U
// remove stale/failed connection
if conn.closed() {
delete(p.connections, key)
conn.Close()
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
Expand Down