help me understand keepalive..

Wayne Davison wayned at samba.org
Wed May 18 23:36:55 GMT 2005


On Wed, May 18, 2005 at 11:23:38AM -0500, Steve Sether wrote:
> But it looks to me like last_io is reset on the sender side every
> time it receives a packet (as well as when it sends a packet).

Ah yes -- how silly of me.  Yes, that will prevent my patch from working
right.  I was fooled into thinking I had fixed something when I kluged
up a test using sleep calls to simulate a slow connection -- this must
have fortuitously caused the last_io value to age and allow the keep-
alive messages to happen (because I verified that the messages were sent
and received, and they did actually fix a timeout in that kluged test-
case).

CVS now has an updated keepalive.diff in the patches dir that keeps a
separate time for the sending and receiving of data (timeouts are based
on a lack of received data, and keep-alives on a lack of sent data).
This should hopefully make things work for you:

http://rsync.samba.org/ftp/unpacked/rsync/patches/keepalive.diff

It did fix a timeout in a (different) test case I tried out.

..wayne..


More information about the rsync mailing list