net: mqtt: Fix incorrect error code use in log
`mqtt_transport_write` failue was logged with `errno` value which is not correct as the return value from the function is valid in this case. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
9587a271f6
commit
5b58273a34
1 changed files with 2 additions and 2 deletions
|
@ -147,8 +147,8 @@ static int client_write(struct mqtt_client *client, const u8_t *data,
|
|||
|
||||
err_code = mqtt_transport_write(client, data, datalen);
|
||||
if (err_code < 0) {
|
||||
MQTT_TRC("TCP write failed, errno = %d, "
|
||||
"closing connection", errno);
|
||||
MQTT_TRC("Transport write failed, err_code = %d, "
|
||||
"closing connection", err_code);
|
||||
client_disconnect(client, err_code);
|
||||
return err_code;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue