Why does --timeout only check last_io_out ?

Timothee Besset
2006-07-27T16:03:42Z

Hello,

I'm synchronizing fairly large files ( ~400Mb ) over a not-so-reliable
internet connection. I've been seeing the rsync operations hang ( strace
the sender side shows no activity ), so I started playing with the
--timeout option.

I'm finding that timeout is completely broken for uploads? Uploads are
consistently aborting like so:

$ rsync --stats --timeout 300 -a -v [blah blah blah]
io timeout after 397 seconds -- exiting
t: 1154011230 last_io_in: 1154010833 last_io_out: 1154011170
rsync error: timeout in data send/receive (code 30) at io.c(173) [sender=2.6.8]

( I added the verbose for t / last_io_in / last_io_out )

The timeout code is based on last_io_in and doesn't check last_io_out.
Every time this happens for uploads I see last_io_out is still within
range ..

TTimo