move logging of connection closing to the session

This commit is contained in:
Marten Seemann
2018-05-10 13:12:02 +09:00
parent 9cc23135d0
commit c7119b2adf
2 changed files with 2 additions and 2 deletions

View File

@@ -248,7 +248,6 @@ func (c *client) establishSecureConnection() error {
go func() {
runErr = c.session.run() // returns as soon as the session is closed
close(errorChan)
c.logger.Infof("Connection %s closed.", c.srcConnID)
if runErr != handshake.ErrCloseSessionForRetry && runErr != errCloseSessionForNewVersion {
c.conn.Close()
}