summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-09-24 21:56:24 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-09-24 21:56:24 +0200
commit5f8a7e8d3141f074bd74dc1eb8901cae452a4cd1 (patch)
tree9063850087a622f721981dac41e72dcd4d5870d4 /src/plugins
parent7eb70ccecd97177c1ce4d0e3c9fcd66da3b7a558 (diff)
downloadweechat-5f8a7e8d3141f074bd74dc1eb8901cae452a4cd1.zip
xfer: fix DCC transfer error (bug #37432)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/xfer/xfer-dcc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/xfer/xfer-dcc.c b/src/plugins/xfer/xfer-dcc.c
index 935f33b24..f23adcee2 100644
--- a/src/plugins/xfer/xfer-dcc.c
+++ b/src/plugins/xfer/xfer-dcc.c
@@ -73,7 +73,7 @@ xfer_dcc_send_file_child (struct t_xfer *xfer)
{
num_read = recv (xfer->sock, (char *) &ack, 4, MSG_PEEK);
if ((num_read < 1) &&
- ((num_read != -1) || (errno != EAGAIN)))
+ ((num_read != -1) || ((errno != EAGAIN) && (errno != EWOULDBLOCK))))
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_SEND_BLOCK);
@@ -125,7 +125,7 @@ xfer_dcc_send_file_child (struct t_xfer *xfer)
* socket is temporarily not available (receiver can't
* receive amount of data we sent ?!)
*/
- if (errno == EAGAIN)
+ if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
usleep (1000);
else
{
@@ -206,7 +206,7 @@ xfer_dcc_recv_file_child (struct t_xfer *xfer)
if (num_read == -1)
{
/* socket is temporarily not available (sender is not fast ?!) */
- if ((errno == EAGAIN) || (errno == EINTR))
+ if ((errno == EAGAIN) || (errno == EWOULDBLOCK) || (errno == EINTR))
usleep (1000);
else
{