public void disconnect() {
if (client != null) {
fireContainerEvent(new ContainerDisconnectingEvent(guid, connectID));
client.disconnect();
fireContainerEvent(new ContainerDisconnectedEvent(guid, connectID));
for (Iterator it = chatSessions.values().iterator(); it.hasNext();) {
((ChatSession) it.next()).close();
}
chatSessions.clear();
connectID = null;