| 118 | } |
| 119 | |
| 120 | bool TorControlConnection::IsConnected() const |
| 121 | { |
| 122 | if (!m_sock) return false; |
| 123 | std::string errmsg; |
| 124 | const bool connected{m_sock->IsConnected(errmsg)}; |
| 125 | if (!connected && !errmsg.empty()) { |
| 126 | LogDebug(BCLog::TOR, "Connection check failed: %s", errmsg); |
| 127 | } |
| 128 | return connected; |
| 129 | } |
| 130 | |
| 131 | bool TorControlConnection::WaitForData(std::chrono::milliseconds timeout) |
| 132 | { |