|
|
@ -2100,12 +2100,15 @@ static void *proxy_recv(void *arg) |
|
|
|
/* Serialise messages from here once we have a cs by
|
|
|
|
/* Serialise messages from here once we have a cs by
|
|
|
|
* holding the semaphore. */ |
|
|
|
* holding the semaphore. */ |
|
|
|
cksem_wait(&cs->sem); |
|
|
|
cksem_wait(&cs->sem); |
|
|
|
if (event.events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP)) |
|
|
|
/* Process any messages before checking for errors in
|
|
|
|
ret = -1; |
|
|
|
* case a message is sent and then the socket |
|
|
|
else { |
|
|
|
* immediately closed. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
if (event.events & EPOLLIN) { |
|
|
|
timeout = 30; |
|
|
|
timeout = 30; |
|
|
|
ret = read_socket_line(cs, &timeout); |
|
|
|
ret = read_socket_line(cs, &timeout); |
|
|
|
} |
|
|
|
} else if (event.events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP)) |
|
|
|
|
|
|
|
ret = -1; |
|
|
|
} |
|
|
|
} |
|
|
|
if (ret < 1) { |
|
|
|
if (ret < 1) { |
|
|
|
LOGNOTICE("Proxy %d:%d %s failed to epoll/read_socket_line in proxy_recv", |
|
|
|
LOGNOTICE("Proxy %d:%d %s failed to epoll/read_socket_line in proxy_recv", |
|
|
|