_mosquitto_net_read must call WSASetLastError when changing errno so that the error code can be picked up by _mosquitto_packet_read
Signed-off-by: Thomas Beckmann (M-Way) <t.beckmann@mwaysolutions.com>
This commit is contained in:
parent
f2376551bc
commit
8e3c2d9af7
@ -697,6 +697,9 @@ ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count)
|
|||||||
net__print_ssl_error(mosq);
|
net__print_ssl_error(mosq);
|
||||||
errno = EPROTO;
|
errno = EPROTO;
|
||||||
}
|
}
|
||||||
|
#ifdef WIN32
|
||||||
|
WSASetLastError(errno);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return (ssize_t )ret;
|
return (ssize_t )ret;
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
Reference in New Issue
Block a user