Critical fix for infinite logging loop

Logging the exception for a `WebSocketClosedError` created an infinite
loop because the `WebSocketLogger` would try to send the error through
the socket, producing the exception again.