MCPcopy Create free account
hub / github.com/amule-project/amule / Disconnect

Method Disconnect

src/ClientTCPSocket.cpp:196–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194
195
196void CClientTCPSocket::Disconnect(const wxString& strReason)
197{
198 byConnected = ES_DISCONNECTED;
199 if (m_client) {
200 if (m_client->Disconnected(strReason, true)) {
201 // Somehow, Safe_Delete() is being called by Disconnected(),
202 // or any other function that sets m_client to NULL,
203 // so we must check m_client first.
204 if (m_client) {
205 m_client->SetSocket( NULL );
206 m_client->Safe_Delete();
207 }
208 }
209 m_client = NULL;
210 }
211
212 Safe_Delete();
213}
214
215
216void CClientTCPSocket::Safe_Delete()

Callers

nothing calls this directly

Calls 3

DisconnectedMethod · 0.80
SetSocketMethod · 0.80
Safe_DeleteMethod · 0.45

Tested by

no test coverage detected