summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_threads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src/msn_threads.cpp')
-rw-r--r--protocols/MSN/src/msn_threads.cpp38
1 files changed, 13 insertions, 25 deletions
diff --git a/protocols/MSN/src/msn_threads.cpp b/protocols/MSN/src/msn_threads.cpp
index 4f762b02e8..e0db9495fa 100644
--- a/protocols/MSN/src/msn_threads.cpp
+++ b/protocols/MSN/src/msn_threads.cpp
@@ -253,36 +253,24 @@ void __cdecl CMsnProto::MSNServerThread(void* arg)
LBL_Exit:
if (info->mIsMainThread) {
- /*
- if (!isConnectSuccess && !usingGateway && m_iDesiredStatus != ID_STATUS_OFFLINE) {
- msnNsThread = NULL;
- usingGateway = true;
+ msnNsThread = nullptr;
- ThreadData* newThread = new ThreadData;
- newThread->mType = SERVER_NOTIFICATION;
- newThread->mIsMainThread = true;
-
- newThread->startThread(&CMsnProto::MSNServerThread, this);
+ if (hKeepAliveThreadEvt) {
+ msnPingTimeout *= -1;
+ SetEvent(hKeepAliveThreadEvt);
}
- else*/ {
- if (hKeepAliveThreadEvt) {
- msnPingTimeout *= -1;
- SetEvent(hKeepAliveThreadEvt);
- }
-
- if (info->s == nullptr)
- ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_NONETWORK);
- else
- MSN_CloseConnections();
- if (hHttpsConnection) {
- Netlib_CloseHandle(hHttpsConnection);
- hHttpsConnection = nullptr;
- }
+ if (info->s == nullptr)
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_NONETWORK);
+ else
+ MSN_CloseConnections();
- MSN_GoOffline();
- msnNsThread = nullptr;
+ if (hHttpsConnection) {
+ Netlib_CloseHandle(hHttpsConnection);
+ hHttpsConnection = nullptr;
}
+
+ MSN_GoOffline();
}
debugLogA("Thread [%08X] ending now", GetCurrentThreadId());