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:
parent
b8c366a5ed
commit
616859cc13
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user