Openfire has an option for idle clients detection available. It can be added in Admin Console > Server > System Properties. Option name is:
Value is set in miliseconds. Default value of this option is probably 360000 (6 minutes). It is possible to set this value to -1. Then Openfire won't disconnect idle clients, it also won't disconnect not active sessions, when client disconnects abnormally (network connection loss).
Setting this value to 60000 will make Openfire to disconnect idle clients after a minute (60 000 miliseconds = 1 minute). One should set an optimal value based on his network and clients activity. If you set this too low, then clients will be disconnecting and reconnecting often. If you set this too big, then you can face problems, then offline clients still showing online (e.g. laptop users disconnecting from the network). Also this depends on clients being used. Some clients send regular "heartbeat" packets to server to show, that they are not disconnected, so server won't disconnect them as idle clients. In that case this option can be set to low values. From my observation i found out, that Spark works fine with low value, so it must be sending heartbeat packets, but Exodus client is reconnecting often if i set this value to 1 minute, even if user is working on that PC, but just dont use Exodus for a minute. So i had to set this to 600000 (10 minutes), to make sure Exodus clients are behaving normally and also to make sure offline users will be disconnected soon enough.