_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>
pull/793/merge
Thomas Beckmann (M-Way) 8 years ago committed by Roger Light
parent a6aa3bc5f9
commit ee610ab19a

@ -784,6 +784,9 @@ ssize_t _mosquitto_net_read(struct mosquitto *mosq, void *buf, size_t count)
}
errno = EPROTO;
}
#ifdef WIN32
WSASetLastError(errno);
#endif
}
return (ssize_t )ret;
}else{

Loading…
Cancel
Save