-
Notifications
You must be signed in to change notification settings - Fork 280
Open
Description
// When keep_alive feature is disabled client can live forever, which is not good in
// distributed broker context so currenlty we don't allow it.
if connect.keep_alive == 0 {
return Err(Error::ZeroKeepAlive);
}
Such behaviour deviates from the 3.1.1 specification:
A Keep Alive value of zero (0) has the effect of turning off the keep alive mechanism. This means that, in this case, the Server is not required to disconnect the Client on the grounds of inactivity.
Note that a Server is permitted to disconnect a Client that it determines to be inactive or non-responsive at any time, regardless of the Keep Alive value provided by that Client.
The server may enforce it's own keep-alive when zero, yet it may not deny clients that wish to abstain from PING obligations.
Metadata
Metadata
Assignees
Labels
No labels