Improve error messages in some situations when clients disconnect.

Reduces the number of "Socket error on client X, disconnecting"
messages.
pull/1405/head
Roger A. Light 6 years ago
parent 779c6cc234
commit f1516f86cb

@ -6,6 +6,8 @@ Broker:
- Fix bridges potentially not connecting on Windows. Closes #478.
- Fix clients authorised using `use_identity_as_username` or
`use_subject_as_username` being disconnected on SIGHUP. Closes #1402.
- Improve error messages in some situations when clients disconnect. Reduces
the number of "Socket error on client X, disconnecting" messages.
Client library:
- Fix reconnect backoff for the situation where connections are dropped rather

@ -709,6 +709,7 @@ static void loop_handle_reads_writes(struct mosquitto_db *db, struct pollfd *pol
#endif
int err;
socklen_t len;
int rc;
#ifdef WITH_EPOLL
int i;
@ -780,8 +781,9 @@ static void loop_handle_reads_writes(struct mosquitto_db *db, struct pollfd *pol
continue;
}
}
if(packet__write(context)){
do_disconnect(db, context, MOSQ_ERR_CONN_LOST);
rc = packet__write(context);
if(rc){
do_disconnect(db, context, rc);
continue;
}
}
@ -822,8 +824,9 @@ static void loop_handle_reads_writes(struct mosquitto_db *db, struct pollfd *pol
#endif
#endif
do{
if(packet__read(db, context)){
do_disconnect(db, context, MOSQ_ERR_CONN_LOST);
rc = packet__read(db, context);
if(rc){
do_disconnect(db, context, rc);
continue;
}
}while(SSL_DATA_PENDING(context));

Loading…
Cancel
Save