View Source mqtt_sessions_will (mqtt_sessions v2.8.0)
Watchdog process, publishes the will and kills the session if it disconnected too long or crashes. The timeout till the session is killed is either the (default) session expiry from mqtt_sessions_process or the expiry interval set in the options of the will message. Periodically the sessions process is polled to see if it is still connected, this is done to prevent any missed disconnect events from the sessions process.
Summary
Functions
Signal the will process that the session got disconnected from the client.
Set a new user context, needed after reauthentication
Sync request to stop the will process
Functions
-spec connected(pid(), map() | undefined, non_neg_integer(), term()) -> ok.
-spec disconnected(pid()) -> ok.
-spec disconnected(pid() | undefined, boolean(), non_neg_integer()) -> ok.
Signal the will process that the session got disconnected from the client.
-spec reconnected(pid()) -> ok.
Set a new user context, needed after reauthentication
-spec stop(pid() | undefined) -> ok.
Sync request to stop the will process