It is not clear if the websocket is disconnected when it becomes idle or when the maximum number of idle websockets is reached. Please explain how the disconnect algorithm works.