Fixed durable clients being unable to receive messages when offline.

This occurred when per_listener_settings was set to true.

Closes #1081. Thanks to dwin-wangjt.
This commit is contained in:
Roger A. Light 2019-02-03 22:26:10 +00:00
parent 17b52bd5d1
commit f952ae3a67
5 changed files with 10 additions and 7 deletions

View File

@ -34,6 +34,8 @@ Broker:
#1080.
- Fix Will not being sent for Websockets clients. Closes #1143.
- Windows: Fix possible crash when client disconnects. Closes #1137.
- Fixed durable clients being unable to receive messages when offline, when
per_listener_settings was set to true. Closes #1081.
Library:
- Fix TLS connections not working over SOCKS.

View File

@ -174,8 +174,6 @@ int net__socket_close(struct mosquitto *mosq)
#ifdef WITH_BROKER
if(mosq->listener){
mosq->listener->client_count--;
assert(mosq->listener->client_count >= 0);
mosq->listener = NULL;
}
#endif

View File

@ -89,11 +89,6 @@ int mosquitto__check_keepalive(struct mosquitto *mosq)
pthread_mutex_unlock(&mosq->msgtime_mutex);
}else{
#ifdef WITH_BROKER
if(mosq->listener){
mosq->listener->client_count--;
assert(mosq->listener->client_count >= 0);
}
mosq->listener = NULL;
net__socket_close(db, mosq);
#else
net__socket_close(mosq);

View File

@ -535,6 +535,10 @@
<option>auth_plugin</option>,
<option>auth_opt_*</option>,
<option>auto_id_prefix</option>.</para>
<para>Note that if set to true, then a durable client (i.e.
with clean session set to false) that has disconnected
will use the ACL settings defined for the listener that
it was most recently connected to.</para>
<para>The default behaviour is for this to be set to
<replaceable>false</replaceable>, which maintains the
settings behaviour from previous versions of

View File

@ -144,6 +144,10 @@
# password_file acl_file psk_file auth_plugin auth_opt_* allow_anonymous
# auto_id_prefix allow_zero_length_clientid
#
# Note that if set to true, then a durable client (i.e. with clean session set
# to false) that has disconnected will use the ACL settings defined for the
# listener that it was most recently connected to.
#
# The default behaviour is for this to be set to false, which maintains the
# setting behaviour from previous versions of mosquitto.
#per_listener_settings false