|
|
@ -1740,7 +1740,7 @@ out: |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
keep_sockalive(cs->fd); |
|
|
|
keep_sockalive(cs->fd); |
|
|
|
event.events = EPOLLIN; |
|
|
|
event.events = EPOLLIN | EPOLLRDHUP; |
|
|
|
event.data.ptr = proxi; |
|
|
|
event.data.ptr = proxi; |
|
|
|
/* Add this connsock_t to the epoll list */ |
|
|
|
/* Add this connsock_t to the epoll list */ |
|
|
|
if (unlikely(epoll_ctl(epfd, EPOLL_CTL_ADD, cs->fd, &event) == -1)) { |
|
|
|
if (unlikely(epoll_ctl(epfd, EPOLL_CTL_ADD, cs->fd, &event) == -1)) { |
|
|
@ -1994,7 +1994,7 @@ static void *proxy_recv(void *arg) |
|
|
|
if (likely(ret > 0)) { |
|
|
|
if (likely(ret > 0)) { |
|
|
|
subproxy = event.data.ptr; |
|
|
|
subproxy = event.data.ptr; |
|
|
|
cs = &subproxy->cs; |
|
|
|
cs = &subproxy->cs; |
|
|
|
if (event.events & EPOLLHUP) |
|
|
|
if (event.events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP)) |
|
|
|
ret = -1; |
|
|
|
ret = -1; |
|
|
|
else |
|
|
|
else |
|
|
|
ret = read_socket_line(cs, 5); |
|
|
|
ret = read_socket_line(cs, 5); |
|
|
@ -2063,7 +2063,7 @@ static void *userproxy_recv(void *arg) |
|
|
|
} |
|
|
|
} |
|
|
|
proxy = event.data.ptr; |
|
|
|
proxy = event.data.ptr; |
|
|
|
cs = &proxy->cs; |
|
|
|
cs = &proxy->cs; |
|
|
|
if (event.events & EPOLLHUP) { |
|
|
|
if (event.events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP)) { |
|
|
|
LOGNOTICE("Proxy %d:%d %s hung up in epoll_wait", proxy->id, |
|
|
|
LOGNOTICE("Proxy %d:%d %s hung up in epoll_wait", proxy->id, |
|
|
|
proxy->subid, proxy->url); |
|
|
|
proxy->subid, proxy->url); |
|
|
|
disable_subproxy(gdata, proxy->parent, proxy); |
|
|
|
disable_subproxy(gdata, proxy->parent, proxy); |
|
|
|