aboutsummaryrefslogtreecommitdiff
path: root/weechat
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-04-09 20:35:34 +0200
committertomsmeding <tom.smeding@gmail.com>2017-04-09 20:35:34 +0200
commitbdbdf79787fb744c5accfa8921e15335971e9efb (patch)
tree3c733337d444f7b0280dd32850564c484116b4e5 /weechat
parent299368b5d5facd4996ad2b763979f2b3edf8cb09 (diff)
weechat: Better recv() <= 0 error reporting
Diffstat (limited to 'weechat')
-rw-r--r--weechat/tomsg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/weechat/tomsg.c b/weechat/tomsg.c
index 9c92543..e800c16 100644
--- a/weechat/tomsg.c
+++ b/weechat/tomsg.c
@@ -289,8 +289,10 @@ static int fd_hook_callback(const void *conn_vp,void *_d,int fd){
if(nr<0){
if(errno==EINTR)continue;
if(errno==EAGAIN)return WEECHAT_RC_OK; // next time around maybe?
+ fprintf(debugf,"fd_hook_callback: recv() < 0: %s\n",strerror(errno));
+ } else {
+ fprintf(debugf,"fd_hook_callback: recv() == 0 (EOF)\n");
}
- fprintf(debugf,"fd_hook_callback: recv() <= 0: %s\n",strerror(errno));
weechat_printf(NULL,"tomsg: Connection dropped");
weechat_buffer_close(conn->buffer);
return WEECHAT_RC_OK;