close connections after a chat is done