Removed incorrect loop in winAccept method

This commit is contained in:
dawidg81 2026-03-08 16:05:28 +01:00
commit 155440f31d

View file

@ -51,7 +51,6 @@ int Socket::winListen()
} }
SOCKET Socket::winAccept(){ SOCKET Socket::winAccept(){
while(Socket::running){
SOCKET clientSocket = accept(mainSocket, NULL, NULL); SOCKET clientSocket = accept(mainSocket, NULL, NULL);
if(clientSocket == INVALID_SOCKET){ if(clientSocket == INVALID_SOCKET){
log.err("Accept failed: " + std::to_string(WSAGetLastError())); log.err("Accept failed: " + std::to_string(WSAGetLastError()));
@ -60,4 +59,3 @@ SOCKET Socket::winAccept(){
log.info("Client connected"); log.info("Client connected");
return clientSocket; return clientSocket;
} }
}