MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / disconnected_cb

Method disconnected_cb

src/torcontrol.cpp:691–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691void TorController::disconnected_cb(TorControlConnection& _conn)
692{
693 // Stop advertising service when disconnected
694 if (service.IsValid())
695 RemoveLocal(service);
696 service = CService();
697 if (!reconnect)
698 return;
699
700 LogPrint(BCLog::TOR, "tor: Not connected to Tor control port %s, trying to reconnect\n", target);
701
702 // Single-shot timer for reconnect. Use exponential backoff.
703 struct timeval time = MillisToTimeval(int64_t(reconnect_timeout * 1000.0));
704 if (reconnect_ev)
705 event_add(reconnect_ev, &time);
706 reconnect_timeout *= RECONNECT_TIMEOUT_EXP;
707}
708
709void TorController::Reconnect()
710{

Callers

nothing calls this directly

Calls 4

RemoveLocalFunction · 0.85
MillisToTimevalFunction · 0.85
CServiceClass · 0.70
IsValidMethod · 0.45

Tested by

no test coverage detected