Skip to content

Commit

Permalink
Further fix for #1401.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Sep 6, 2019
1 parent d03a318 commit 5fd92cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/session_expiry.c
Expand Up @@ -79,6 +79,7 @@ void session_expiry__remove_all(struct mosquitto_db *db)
session_expiry__remove(context);
context->session_expiry_interval = 0;
context->will_delay_interval = 0;
will_delay__remove(context);
context__disconnect(db, context);
}

Expand All @@ -104,6 +105,7 @@ void session_expiry__check(struct mosquitto_db *db, time_t now)
context->session_expiry_interval = 0;
/* Session has expired, so will delay should be cleared. */
context->will_delay_interval = 0;
will_delay__remove(context);
context__send_will(db, context);
context__add_to_disused(db, context);
}else{
Expand Down
1 change: 1 addition & 0 deletions src/will_delay.c
Expand Up @@ -96,6 +96,7 @@ void will_delay__remove(struct mosquitto *mosq)
{
if(mosq->will_delay_entry != NULL){
DL_DELETE(delay_list, mosq->will_delay_entry);
mosquitto__free(mosq->will_delay_entry);
mosq->will_delay_entry = NULL;
}
}
Expand Down

0 comments on commit 5fd92cb

Please sign in to comment.