Free clients with session expiry > 0 on exit.

pull/1203/head
Roger A. Light 7 years ago
parent 08249313a4
commit b82370a997

@ -391,6 +391,7 @@ int main(int argc, char *argv[])
context__send_will(&int_db, ctxt); context__send_will(&int_db, ctxt);
} }
will_delay__send_all(&int_db); will_delay__send_all(&int_db);
session_expiry__remove_all(&int_db);
#ifdef WITH_PERSISTENCE #ifdef WITH_PERSISTENCE
if(config.persistence){ if(config.persistence){

@ -653,6 +653,7 @@ int mosquitto_psk_key_get_default(struct mosquitto_db *db, struct mosquitto *con
* ============================================================ */ * ============================================================ */
int session_expiry__add(struct mosquitto *context); int session_expiry__add(struct mosquitto *context);
void session_expiry__remove(struct mosquitto *context); void session_expiry__remove(struct mosquitto *context);
void session_expiry__remove_all(struct mosquitto_db *db);
void session_expiry__check(struct mosquitto_db *db, time_t now); void session_expiry__check(struct mosquitto_db *db, time_t now);
void session_expiry__send_all(struct mosquitto_db *db); void session_expiry__send_all(struct mosquitto_db *db);

Loading…
Cancel
Save