diff options
-rw-r--r-- | src/plugins/xfer/xfer-dcc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/xfer/xfer-dcc.c b/src/plugins/xfer/xfer-dcc.c index 44fc56caf..19d9ee99a 100644 --- a/src/plugins/xfer/xfer-dcc.c +++ b/src/plugins/xfer/xfer-dcc.c @@ -28,6 +28,7 @@ #include <sys/socket.h> #include <poll.h> #include <netinet/in.h> +#include <netinet/tcp.h> #include <fcntl.h> #include <time.h> #include <netdb.h> @@ -345,6 +346,11 @@ xfer_dcc_recv_file_child (struct t_xfer *xfer) return; } + /* set TCP_NODELAY to be more aggressive with acks */ + /* ignore error as transfer should still work if this fails */ + flags = 1; + setsockopt(xfer->sock, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof(flags)); + /* connection is OK, change DCC status (inform parent process) */ xfer_network_write_pipe (xfer, XFER_STATUS_ACTIVE, XFER_NO_ERROR); |