Disconnection of client session during abnormal conditions

Hai i am using Smack api and Openfire Server for IM Web applications., apllication working properly in normal logout situations,

during abnormal conditions client session never disconnects from Openfire server., is this possible to disconnect client session from improper shutdowns … ???

Pls any one let me know … if possible how to do that …