mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
additional error handling
This commit is contained in:
parent
11d9f9562e
commit
705c209f8a
1 changed files with 1 additions and 0 deletions
|
|
@ -699,6 +699,7 @@ public:
|
|||
int size = recv(descriptor, buffer.data(), buffer.size(), 0);
|
||||
logger.info() << "SocketUdpConnection received " << size;
|
||||
if (size <= 0) {
|
||||
logger.error() << handle_socket_error("SocketUdpConnection::recv").what();
|
||||
if (!open) break;
|
||||
closesocket(descriptor);
|
||||
state = ConnectionState::CLOSED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue