Now possible to cancel websocket connection by calling close() within the opening event