1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Treat connection reset in router code as proper disconnect.

This commit is contained in:
Daniel Collins 2011-09-10 11:46:09 +00:00
parent b8c366a5ed
commit 616859cc13

View File

@ -236,9 +236,12 @@ DWORD router_main(void *arg) {
if((len = recv(router->clients[i].sock, bstart, len, 0)) == -1) {
if(WSAGetLastError() == WSAEWOULDBLOCK) {
continue;
}else if(WSAGetLastError() == WSAECONNRESET) {
/* Treat connection reset as regular close */
len = 0;
}else{
log_printf("Error reading from client socket: %s", w32_error(WSAGetLastError()));
}
log_printf("Error reading from client socket: %s", w32_error(WSAGetLastError()));
}
if(len == -1 || len == 0) {