bool ClientWS::reconnect() { try { return Super::reconnect(); } catch (NetworkException &e) { scheduleReconnect(); return true; } catch (IOException &e) { scheduleReconnect(); return true; } }
void EventSource::networkRequestEnded() { InspectorInstrumentation::didFinishEventSourceRequest(getExecutionContext(), this); m_loader = nullptr; if (m_state != kClosed) scheduleReconnect(); }
void IRCServer::disconnectedEvent() { printf("[IRCServer:%p] disconnectedEvent\n", this); status.pushMessage("Disconnected."); for (auto &i : channels) i.second->disconnected(); if (isActive) scheduleReconnect(); }
void EventSource::networkRequestEnded() { ASSERT(m_requestInFlight); m_requestInFlight = false; if (m_state != CLOSED) scheduleReconnect(); else unsetPendingActivity(this); }
void EventSource::networkRequestEnded() { if (!m_requestInFlight) return; InspectorInstrumentation::didFinishEventSourceRequest(executionContext(), this); m_requestInFlight = false; if (m_state != CLOSED) scheduleReconnect(); }
void EventSource::endRequest() { m_requestInFlight = false; if (!m_failSilently) dispatchEvent(Event::create(eventNames().errorEvent, false, false)); if (!scriptExecutionContext()->isWorkerContext()) cache()->loader()->nonCacheRequestComplete(m_url); if (m_state != CLOSED) scheduleReconnect(); else unsetPendingActivity(this); }
void ClientWS::connect(const ConnectConfig &config) { this->scheduler = config.scheduler; this->executor = config.executor; this->dispatcher = config.dispatcher; this->logObject = config.logObject; if (this->dispatcher) this->fakeRequest = new ClientFakeRequest(*this); this->connectMethod = config.connectMethod; try { connect(config.listener); } catch (NetworkException &) { scheduleReconnect(); } }
void EventSource::networkRequestEnded() { LOG(TRACE) + "networkRequestEnded"; { common::CMutexLock lock(m_mxReqAccess); if (m_pNetRequest == 0) return; m_pNetRequest = 0; } if (m_state != CLOSED) scheduleReconnect(); // else // unsetPendingActivity(this); }
void IRCServer::connectionErrorEvent() { status.pushMessage("Connection failed."); if (isActive) scheduleReconnect(); }
void ClientWS::onLostConnection(natural) { Synchronized<FastLockR> _(lock); waitingResults.clear(); if (scheduler != null) scheduleReconnect(); }