| 97 | } |
| 98 | |
| 99 | void NetDb::Stop () |
| 100 | { |
| 101 | if (m_Requests) |
| 102 | m_Requests->Stop (); |
| 103 | if (m_IsRunning) |
| 104 | { |
| 105 | if (m_PersistProfiles) |
| 106 | SaveProfiles (); |
| 107 | DeleteObsoleteProfiles (); |
| 108 | m_RouterInfos.clear (); |
| 109 | m_Floodfills.Clear (); |
| 110 | if (m_Thread) |
| 111 | { |
| 112 | m_IsRunning = false; |
| 113 | m_Queue.WakeUp (); |
| 114 | m_Thread->join (); |
| 115 | delete m_Thread; |
| 116 | m_Thread = 0; |
| 117 | } |
| 118 | m_LeaseSets.clear(); |
| 119 | } |
| 120 | m_Requests = nullptr; |
| 121 | } |
| 122 | |
| 123 | void NetDb::Run () |
| 124 | { |
nothing calls this directly
no test coverage detected