summaryrefslogtreecommitdiff
path: root/src/plugins/xfer/xfer-dcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/xfer/xfer-dcc.c')
-rw-r--r--src/plugins/xfer/xfer-dcc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/plugins/xfer/xfer-dcc.c b/src/plugins/xfer/xfer-dcc.c
index 3c4a37d22..e9d019d03 100644
--- a/src/plugins/xfer/xfer-dcc.c
+++ b/src/plugins/xfer/xfer-dcc.c
@@ -342,14 +342,17 @@ xfer_dcc_recv_file_child (struct t_xfer *xfer)
}
/* first connect to sender (blocking) */
- xfer->sock = weechat_network_connect_to (xfer->proxy,
- xfer->remote_address,
- xfer->remote_address_length);
- if (xfer->sock == -1)
+ if (xfer->type == XFER_TYPE_FILE_RECV_ACTIVE)
{
- xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
- XFER_ERROR_CONNECT_SENDER);
- return;
+ xfer->sock = weechat_network_connect_to (xfer->proxy,
+ xfer->remote_address,
+ xfer->remote_address_length);
+ if (xfer->sock == -1)
+ {
+ xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
+ XFER_ERROR_CONNECT_SENDER);
+ return;
+ }
}
/* set TCP_NODELAY to be more aggressive with acks */