[476314] Deliver queued WS client msgs on reconnect.

Thanks to Joking Young and Christoph Krey.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476314
pull/145/head
Roger A. Light 10 years ago
parent af995d211d
commit d9142c3974

@ -1,6 +1,11 @@
1.4.9 - 20160xxx
================
Broker:
- Ensure websockets clients that previously connected with clean session set
to false have their queued messages delivered immediately on reconnecting.
Closes #476314.
Client library:
- Fix the case where a message received just before the keepalive timer
expired would cause the client to miss the keepalive timer.

@ -218,6 +218,8 @@ static int callback_mqtt(struct libwebsocket_context *context,
return -1;
}
mqtt3_db_message_write(db, mosq);
if(mosq->out_packet && !mosq->current_out_packet){
mosq->current_out_packet = mosq->out_packet;
mosq->out_packet = mosq->out_packet->next;

Loading…
Cancel
Save