mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-21 23:47:52 +08:00
Guard against libwebsockets assert in 3.2.1 and up.
This commit is contained in:
@@ -242,6 +242,10 @@ static void loop_handle_reads_writes(struct mosquitto *context, uint32_t events)
|
||||
socklen_t len;
|
||||
int rc;
|
||||
|
||||
if(context->sock == INVALID_SOCKET){
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WITH_WEBSOCKETS
|
||||
if(context->wsi){
|
||||
struct lws_pollfd wspoll;
|
||||
|
||||
@@ -246,6 +246,10 @@ static void loop_handle_reads_writes(struct pollfd *pollfds)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(pollfds[context->pollfd_index].fd == INVALID_SOCKET){
|
||||
continue;
|
||||
}
|
||||
|
||||
assert(pollfds[context->pollfd_index].fd == context->sock);
|
||||
|
||||
#ifdef WITH_WEBSOCKETS
|
||||
|
||||
Reference in New Issue
Block a user