MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / Stop

Method Stop

libi2pd_client/SAM.cpp:1456–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1454 }
1455
1456 void SAMBridge::Stop ()
1457 {
1458 try
1459 {
1460 m_Acceptor.cancel ();
1461 }
1462 catch (const std::exception& ex)
1463 {
1464 LogPrint (eLogError, "SAM: Runtime exception: ", ex.what ());
1465 }
1466
1467 decltype(m_Sessions) sessions;
1468 {
1469 std::unique_lock<std::mutex> l(m_SessionsMutex);
1470 m_Sessions.swap (sessions);
1471 }
1472 for (auto& it: sessions)
1473 it.second->Close ();
1474
1475 StopIOService ();
1476 }
1477
1478 void SAMBridge::Accept ()
1479 {

Callers 2

StopLocalDestinationMethod · 0.45
TerminateMethod · 0.45

Calls 2

LogPrintFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected