diff --git a/Flakkari/Server/UDPServer.cpp b/Flakkari/Server/UDPServer.cpp index e36e672..46d9493 100644 --- a/Flakkari/Server/UDPServer.cpp +++ b/Flakkari/Server/UDPServer.cpp @@ -62,6 +62,8 @@ bool UDPServer::handleInput(int fd) void UDPServer::handlePacket() { auto packet = _socket->receiveFrom(); + if (!packet.has_value()) + return; auto resultAddClient = ClientManager::GetInstance().addClient(packet->first, packet->second); ClientManager::UnlockInstance(); if (!resultAddClient.has_value())