Permalink
Browse files

[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
  • Loading branch information...
1 parent af995d2 commit d9142c3974be0ef6d4bc3a0aef762f8a7d8e1f32 @ralight ralight committed Mar 5, 2016
Showing with 7 additions and 0 deletions.
  1. +5 −0 ChangeLog.txt
  2. +2 −0 src/websockets.c
View
@@ -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.
View
@@ -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;

0 comments on commit d9142c3

Please sign in to comment.