Skip to content

Commit

Permalink
Merge pull request #420 from ChIoT-Tech/fix-419
Browse files Browse the repository at this point in the history
corrects panic on 'CONNACK was not CONN_ACCEPTED'
  • Loading branch information
Al S-M committed May 11, 2020
2 parents 5ee5084 + 1a2eb2c commit 4c98a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Expand Up @@ -377,7 +377,7 @@ func (c *client) attemptConnection() (net.Conn, byte, bool, error) {
goto CONN
}
if c.options.protocolVersionExplicit { // to maintain logging from previous version
ERROR.Println(CLI, "Connecting to", broker, "CONNACK was not CONN_ACCEPTED, but rather", err.Error())
ERROR.Println(CLI, "Connecting to", broker, "CONNACK was not CONN_ACCEPTED, but rather", packets.ConnackReturnCodes[rc])
}
}
// If the connection was successful we set member variable and lock in the protocol version for future connection attempts (and users)
Expand Down

0 comments on commit 4c98a23

Please sign in to comment.