mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
update Network.cpp
This commit is contained in:
parent
705c209f8a
commit
de5a05e80e
1 changed files with 2 additions and 1 deletions
|
|
@ -694,7 +694,7 @@ public:
|
|||
|
||||
thread = std::make_unique<std::thread>([this]() {
|
||||
util::Buffer<char> buffer(16'384);
|
||||
while (open) {
|
||||
while (true) {
|
||||
logger.info() << "SocketUdpConnection listening";
|
||||
int size = recv(descriptor, buffer.data(), buffer.size(), 0);
|
||||
logger.info() << "SocketUdpConnection received " << size;
|
||||
|
|
@ -728,6 +728,7 @@ public:
|
|||
void close(bool discardAll=false) override {
|
||||
if (!open) return;
|
||||
open = false;
|
||||
logger.info() << "closing udp connection";
|
||||
|
||||
if (state != ConnectionState::CLOSED) {
|
||||
shutdown(descriptor, 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue