Mark the socket as not connected before releasing socket_mutex
Issue 190 ( https://github.com/eclipse/paho.mqtt.c/issues/190 ) is probably caused by some race condition. One possible cause for such a race condition is in the previous implementation of MQTTAsync_closeOnly(). Which had released the semaphore before the socket is marked as unused. This way, another thread may believe, that it should wait that the socket becomes available (which never happens). Signed-off-by:Juergen Kosel <juergen.kosel@softing.com>
Showing
Please
register
or
sign in
to comment