Minimal fixed loop to stop the immediate exit

This commit is contained in:
dawidg81 2026-03-08 13:51:10 +01:00
commit 660f2f8d94

View file

@ -16,6 +16,17 @@ int main() {
socket.winBind();
socket.winListen();
running = true;
while(running){
SOCKET clientSocket = accept(socket.mainSocket, NULL, NULL);
if(clientSocket == INVALID_SOCKET){
log.err("Accept failed: " + std::to_string(WSAGetLastError()));
continue;
}
log.info("Client connected");
closesocket(clientSocket);
}
return 0;
}