aboutsummaryrefslogtreecommitdiff
path: root/weechat
diff options
context:
space:
mode:
Diffstat (limited to 'weechat')
-rw-r--r--weechat/tomsg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/weechat/tomsg.c b/weechat/tomsg.c
index c53a9a0..1235a71 100644
--- a/weechat/tomsg.c
+++ b/weechat/tomsg.c
@@ -218,7 +218,10 @@ static int fd_hook_callback(const void *conn_vp,void *_d,int fd){
while(true){
nr=recv(fd,conn->linebuf+conn->linebuf_len,conn->linebuf_sz-conn->linebuf_len,0);
if(nr<=0){
- if(nr<0&&errno==EINTR)continue;
+ 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));
weechat_printf(NULL,"tomsg: Connection dropped");
weechat_buffer_close(conn->buffer);