Skip to content

Commit

Permalink
Community contributor fix to improve freezing.
Browse files Browse the repository at this point in the history
  • Loading branch information
timtest4 committed Nov 2, 2018
1 parent 227390c commit 56cdfe3
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions UCPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -690,17 +690,30 @@ class UCPClient {
}

while ((!check1)) {
long result = recv(ucpServerSocket, message + cursor, 1,
#ifdef _WIN32
NULL
#else
0
#endif
);
try {
long result = recv(ucpServerSocket, message + cursor, 1,
#ifdef _WIN32
NULL
#else
0
#endif
);
}
catch(char* e)
{
//ex
}

cursor++;

check1 = message[cursor - 1] == '\n';
if ((message != nullptr) && (message[0] == '\0'))
{
Sleep(1000);
}
else
{
check1 = message[cursor - 1] == '\n';
}
}

Log::info("Processing command:");
Expand Down

0 comments on commit 56cdfe3

Please sign in to comment.