Prevent double websocket close, use the new isClosedByClient API