Skip to content

Commit

Permalink
net: Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Apr 5, 2024
1 parent 0bc0308 commit ea09870
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/Network/P2P_interface2Th.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ uint32_t WINAPI TestServerThread(void* lpParameter)
extern std::atomic_uint64_t net_thread_id;

//Second thread
extern PNetCenter* netCenter = nullptr;
PNetCenter* netCenter = nullptr;
int InternalServerThreadInit(void* lpParameter)
{
xassert(netCenter == nullptr);
Expand All @@ -87,7 +87,7 @@ extern void PNetCenterNetQuant() {
if (netCenter->SecondThreadLive()) {
netCenter->SecondThreadQuant();
} else {
InternalServerThreadDeinit(0);
InternalServerThreadDeinit(nullptr);
}
}
}
Expand Down Expand Up @@ -369,7 +369,9 @@ void InternalServerThreadDeinit(HANDLE secondThread) {
CoUninitialize();
#endif
//We are creating it with SDL thread, so we need to manually signal it
SetEvent(secondThread);
if (secondThread) {
SetEvent(secondThread);
}
}
}

Expand Down

0 comments on commit ea09870

Please sign in to comment.