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:
Robert Lubos 2020-02-13 11:55:18 +01:00 committed by Jukka Rissanen
commit 5b58273a34

View file

@ -147,8 +147,8 @@ static int client_write(struct mqtt_client *client, const u8_t *data,
err_code = mqtt_transport_write(client, data, datalen); err_code = mqtt_transport_write(client, data, datalen);
if (err_code < 0) { if (err_code < 0) {
MQTT_TRC("TCP write failed, errno = %d, " MQTT_TRC("Transport write failed, err_code = %d, "
"closing connection", errno); "closing connection", err_code);
client_disconnect(client, err_code); client_disconnect(client, err_code);
return err_code; return err_code;
} }