Skip to content

Commit

Permalink
[476314] Deliver queued WS client msgs on reconnect.
Browse files Browse the repository at this point in the history
Thanks to Joking Young and Christoph Krey.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476314
  • Loading branch information
ralight committed Mar 5, 2016
1 parent af995d2 commit d9142c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions src/websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d9142c3

Please sign in to comment.