unregisterHandler handler when websocket exception or close