mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Remove RDHUP processing
Do not actually need it, may lead to connection closed before all data read
This commit is contained in:
parent
6ecb4993fd
commit
ee0eac51d6
@ -167,10 +167,6 @@ log(logbuf);
|
|||||||
memset(fds, 0, sizeof(fds));
|
memset(fds, 0, sizeof(fds));
|
||||||
fds[0].fd = param->clisock;
|
fds[0].fd = param->clisock;
|
||||||
fds[1].fd = param->remsock;
|
fds[1].fd = param->remsock;
|
||||||
#ifdef POLLRDHUP
|
|
||||||
fds[0].events = POLLRDHUP;
|
|
||||||
fds[1].events = POLLRDHUP;
|
|
||||||
#endif
|
|
||||||
so._poll(fds, 2, sleeptime);
|
so._poll(fds, 2, sleeptime);
|
||||||
sleeptime = 0;
|
sleeptime = 0;
|
||||||
}
|
}
|
||||||
@ -455,11 +451,7 @@ log("done read from server to buf");
|
|||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("wait reading from client");
|
log("wait reading from client");
|
||||||
#endif
|
#endif
|
||||||
fds[fdsc].events |= (POLLIN
|
fds[fdsc].events |= (POLLIN);
|
||||||
#ifdef POLLRDHUP
|
|
||||||
|POLLRDHUP
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if(!TOCLIENT && (inserverbuf
|
if(!TOCLIENT && (inserverbuf
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
@ -477,11 +469,7 @@ log("wait writing to client");
|
|||||||
CLIENTTERM = 1;
|
CLIENTTERM = 1;
|
||||||
HASERROR |= 1;
|
HASERROR |= 1;
|
||||||
}
|
}
|
||||||
else if(fds[fdsc].revents & (POLLHUP
|
else if(fds[fdsc].revents & (POLLHUP)) {
|
||||||
#ifdef POLLRDHUP
|
|
||||||
|POLLRDHUP
|
|
||||||
#endif
|
|
||||||
)) {
|
|
||||||
CLIENTTERM = 1;
|
CLIENTTERM = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -516,11 +504,7 @@ log("ready to write to client");
|
|||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("wait reading from server");
|
log("wait reading from server");
|
||||||
#endif
|
#endif
|
||||||
fds[fdsc].events |= (POLLIN
|
fds[fdsc].events |= (POLLIN);
|
||||||
#ifdef POLLRDHUP
|
|
||||||
|POLLRDHUP
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if(!TOSERVER && (inclientbuf
|
if(!TOSERVER && (inclientbuf
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
@ -542,11 +526,7 @@ log("poll from server failed");
|
|||||||
SERVERTERM = 1;
|
SERVERTERM = 1;
|
||||||
HASERROR |=2;
|
HASERROR |=2;
|
||||||
}
|
}
|
||||||
if(fds[fdsc].revents & (POLLHUP
|
if(fds[fdsc].revents & (POLLHUP)) {
|
||||||
#ifdef POLLRDHUP
|
|
||||||
|POLLRDHUP
|
|
||||||
#endif
|
|
||||||
)) {
|
|
||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("server terminated connection");
|
log("server terminated connection");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user