Skip to content

Commit

Permalink
Fix bridges potentially not connecting on Windows.
Browse files Browse the repository at this point in the history
Closes #478.
  • Loading branch information
ralight committed Sep 4, 2019
1 parent 7686570 commit 412379b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.txt
Expand Up @@ -3,6 +3,7 @@ Broker:
protocol error. Closes #1367.
- Fix support for libwebsockets 3.x.
- Fix slow websockets performance when sending large messages. Closes #1390.
- Fix bridges potentially not connecting on Windows. Closes #478.

Documentation:
- Improve details on global/per listener options in the mosquitto.conf man page.
Expand Down
6 changes: 5 additions & 1 deletion lib/packet_mosq.c
Expand Up @@ -239,7 +239,11 @@ int packet__write(struct mosquitto *mosq)
#ifdef WIN32
errno = WSAGetLastError();
#endif
if(errno == EAGAIN || errno == COMPAT_EWOULDBLOCK){
if(errno == EAGAIN || errno == COMPAT_EWOULDBLOCK
#ifdef WIN32
|| errno == WSAENOTCONN
#endif
){
pthread_mutex_unlock(&mosq->current_out_packet_mutex);
return MOSQ_ERR_SUCCESS;
}else{
Expand Down

0 comments on commit 412379b

Please sign in to comment.