handle websocket onclose

handle websocket onclose event in BrowserTransport