1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Update Net.hpp

This commit is contained in:
Sandu Liviu Catalin 2021-09-05 13:40:21 +03:00
parent 1a11dd777e
commit 11c17189b3

View File

@ -110,6 +110,7 @@ struct WsClient
try { try {
mState = mWebSocket.receiveFrame(mBuffer, mFlags); mState = mWebSocket.receiveFrame(mBuffer, mFlags);
} catch (const Poco::TimeoutException &) { } catch (const Poco::TimeoutException &) {
mState = mFlags = 0; // Make sure these don't indicate otherwise
return LightObj{}; // We handle timeout so we can be non blocking return LightObj{}; // We handle timeout so we can be non blocking
} }
// If something was returned // If something was returned
@ -139,6 +140,7 @@ struct WsClient
try { try {
mState = mWebSocket.receiveFrame(mBuffer, mFlags); mState = mWebSocket.receiveFrame(mBuffer, mFlags);
} catch (const Poco::TimeoutException &) { } catch (const Poco::TimeoutException &) {
mState = mFlags = 0; // Make sure these don't indicate otherwise
return LightObj{}; // We handle timeout so we can be non blocking return LightObj{}; // We handle timeout so we can be non blocking
} }
// If something was returned // If something was returned