Removed incorrect loop in winAccept method
This commit is contained in:
parent
0b66a284be
commit
155440f31d
1 changed files with 6 additions and 8 deletions
|
|
@ -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()));
|
||||||
|
|
@ -59,5 +58,4 @@ SOCKET Socket::winAccept(){
|
||||||
}
|
}
|
||||||
log.info("Client connected");
|
log.info("Client connected");
|
||||||
return clientSocket;
|
return clientSocket;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue