summaryrefslogtreecommitdiff
path: root/usr.bin/rsync/sender.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2020-11-24 16:54:45 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2020-11-24 16:54:45 +0000
commitd36543e01e06e9a20a91e07886fb3ee3ed524619 (patch)
treeff32c81d0446dbfbf1ae8310af581424f802b26f /usr.bin/rsync/sender.c
parent419777807120db45315efd00f51878866f0614c7 (diff)
Simple implementation of --timeout to exit after specified seconds of I/O
inactivity. By default rsync will wait forever but this results in stuck processes if the remote side does not answer properly as seen in rpki-client. OK job@ benno@
Diffstat (limited to 'usr.bin/rsync/sender.c')
-rw-r--r--usr.bin/rsync/sender.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c
index 5f9850ee9d2..524a4f35c89 100644
--- a/usr.bin/rsync/sender.c
+++ b/usr.bin/rsync/sender.c
@@ -1,4 +1,4 @@
-/* $Id: sender.c,v 1.25 2019/06/28 13:35:03 deraadt Exp $ */
+/* $Id: sender.c,v 1.26 2020/11/24 16:54:44 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -452,7 +452,7 @@ rsync_sender(struct sess *sess, int fdin,
for (;;) {
assert(pfd[0].fd != -1);
- if ((c = poll(pfd, 3, POLL_TIMEOUT)) == -1) {
+ if ((c = poll(pfd, 3, poll_timeout)) == -1) {
ERR("poll");
goto out;
} else if (c == 0) {