trying to disconnect client when connection lost.