MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / waitForConnected

Method waitForConnected

cli/application.cpp:276–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276bool Application::waitForConnected()
277{
278 auto isConnected = m_connection.isConnected();
279 auto checkStatus = std::function<void(SyncthingStatus)>([this, &isConnected](SyncthingStatus) { isConnected = m_connection.isConnected(); });
280 auto errorConn = signalInfo(&m_connection, &SyncthingConnection::error);
281 auto statusChangedConn = signalInfo(&m_connection, &SyncthingConnection::statusChanged, checkStatus, &isConnected);
282 return waitForSignalsOrFail(std::bind(static_cast<void (SyncthingConnection::*)(SyncthingConnectionSettings &)>(&SyncthingConnection::reconnect),
283 ref(m_connection), ref(m_settings)),
284 m_generalTimeout, errorConn, statusChangedConn);
285}
286
287bool Application::waitForConfig()
288{

Callers 1

Calls 3

signalInfoFunction · 0.85
waitForSignalsOrFailFunction · 0.85
isConnectedMethod · 0.45

Tested by

no test coverage detected