Accept method returns an error correctly
This commit is contained in:
parent
1184ebd8bf
commit
b5b0617125
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ SOCKET Socket::winAccept(){
|
|||
SOCKET clientSocket = accept(mainSocket, NULL, NULL);
|
||||
if(clientSocket == INVALID_SOCKET){
|
||||
log.err("Accept failed: " + std::to_string(WSAGetLastError()));
|
||||
continue;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
log.info("Client connected");
|
||||
return clientSocket;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue