aboutsummaryrefslogtreecommitdiff
path: root/src/conn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn.cpp')
-rw-r--r--src/conn.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conn.cpp b/src/conn.cpp
index 5897c9e..2a7735b 100644
--- a/src/conn.cpp
+++ b/src/conn.cpp
@@ -96,8 +96,9 @@ void ConnPool::Conn::recv_data(evutil_socket_t fd, short events) {
buff_seg.resize(seg_buff_size);
ret = recv(fd, buff_seg.data(), seg_buff_size, 0);
SALTICIDAE_LOG_DEBUG("socket read %zd bytes", ret);
- if (ret < 0 && errno != EWOULDBLOCK)
+ if (ret < 0)
{
+ if (errno == EWOULDBLOCK) break;
SALTICIDAE_LOG_INFO("reason: %s", strerror(errno));
/* connection err or half-opened connection */
terminate();