Only process network errors for clients that have nothing to read.
Closes #7.
This commit is contained in:
parent
c26892244c
commit
eff8fab1b4
@ -1,6 +1,12 @@
|
|||||||
1.5.4 - 201810xx
|
1.5.4 - 201810xx
|
||||||
================
|
================
|
||||||
|
|
||||||
|
Broker:
|
||||||
|
- Process all pending messages even when a client has disconnected. This means
|
||||||
|
a client that send a PUBLISH then DISCONNECT quickly, then disconnects will
|
||||||
|
have its DISCONNECT message processed properly and so no Will will be sent.
|
||||||
|
Closes #7.
|
||||||
|
|
||||||
Library:
|
Library:
|
||||||
- Fix memory leak that occurred if mosquitto_reconnect() was used when TLS
|
- Fix memory leak that occurred if mosquitto_reconnect() was used when TLS
|
||||||
errors were present. Closes #592.
|
errors were present. Closes #592.
|
||||||
|
11
src/loop.c
11
src/loop.c
@ -813,14 +813,15 @@ static void loop_handle_reads_writes(struct mosquitto_db *db, struct pollfd *pol
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}while(SSL_DATA_PENDING(context));
|
}while(SSL_DATA_PENDING(context));
|
||||||
}
|
}else{
|
||||||
#ifdef WITH_EPOLL
|
#ifdef WITH_EPOLL
|
||||||
if(events & (EPOLLERR | EPOLLHUP)){
|
if(events & (EPOLLERR | EPOLLHUP)){
|
||||||
#else
|
#else
|
||||||
if(context->pollfd_index >= 0 && pollfds[context->pollfd_index].revents & (POLLERR | POLLNVAL | POLLHUP)){
|
if(context->pollfd_index >= 0 && pollfds[context->pollfd_index].revents & (POLLERR | POLLNVAL | POLLHUP)){
|
||||||
#endif
|
#endif
|
||||||
do_disconnect(db, context);
|
do_disconnect(db, context);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user