Browse Source

Merge pull request #83 from ldmi3i/error_on_reconnect

Error handling on channel closing while reconnecting.
pull/95/head
Lane Wagner 3 years ago
committed by GitHub
parent
commit
16f2cae01c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      channel.go

+ 7
- 2
channel.go View File

@ -103,8 +103,13 @@ func (chManager *channelManager) reconnect() error {
return err
}
chManager.channel.Close()
chManager.connection.Close()
if err = chManager.channel.Close(); err != nil {
chManager.logger.Warnf("error closing channel while reconnecting: %v", err)
}
if err = chManager.connection.Close(); err != nil {
chManager.logger.Warnf("error closing connection while reconnecting: %v", err)
}
chManager.connection = newConn
chManager.channel = newChannel


Loading…
Cancel
Save