• zhenwei.pi's avatar
    usbredirserver : enable TCP keepalive · aca0e87d
    zhenwei.pi authored
    In some bad cases, for example, host OS crashes without
    sending any FIN to usbredirserver, and usbredirserver
    will keep idle connection for a long time.
    
    We can also set the kernel arguments, it means that other
    processes may be affected.
    
    Setting a sensible timeout(like 10 minutes) seems good.
    But QEMU is restarted after host OS crashes, it usually
    needs to reconnect usbredirserver within 2 minutes.
    
    So, add cmdline argument '-k' and "--keepalive" for
    usbredirserver to set tcp keepalive idle time,
    interval time(10s), and maximum number of keepalive probes
    count(3). Detecting disconnection costs time is :
    	idle time + 10s * 3
    
    If setting TCP keepalive fails with errno ENOTSUP, ignore
    the specific error.
    Signed-off-by: 's avatarzhenwei.pi <zhenwei.pi@youruncloud.com>
    Tested-by: Uri Lublin's avatarUri Lublin <uril@redhat.com>
    Acked-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
    aca0e87d
Name
Last commit
Last update
usbredirhost Loading commit data...
usbredirparser Loading commit data...
usbredirserver Loading commit data...
usbredirtestclient Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
ChangeLog Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
README.multi-thread Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
git.mk Loading commit data...
usb-redirection-protocol.txt Loading commit data...