Re: [Spice-devel] [PATCH usbredirserver] usbredirserver : enable TCP keepalive

2018-03-08 Thread Zhenwei.Pi
On 03/08/2018 03:30 AM, Uri Lublin wrote: On 03/01/2018 11:08 AM, zhenwei.pi wrote: 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

[Spice-devel] [PATCH usbredirserver] usbredirserver : enable TCP keepalive

2018-03-01 Thread zhenwei.pi
Signed-off-by: zhenwei.pi <zhenwei...@youruncloud.com> --- usbredirserver/usbredirserver.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/usbredirserver/usbredirserver.c b/usbredirserver/usbredirserver.c index 5575181..3a7620a 100644 ---

[Spice-devel] [PATCH] usbredirserver : enable TCP keepalive

2018-03-09 Thread zhenwei.pi
Detecting disconnection costs time is : 30s + 10s * 3 = 60s If setting TCP keepalive fails with errno ENOTSUP, ignore the specific error. Signed-off-by: zhenwei.pi <zhenwei...@youruncloud.com> --- usbredirserver/usbredirserver.c | 41 - 1 file change

[Spice-devel] [PATCH] usbredirserver : enable TCP keepalive

2018-03-09 Thread zhenwei.pi
connection costs time is : idle time + 10s * 3 If setting TCP keepalive fails with errno ENOTSUP, ignore the specific error. Signed-off-by: zhenwei.pi <zhenwei...@youruncloud.com> Tested-by: Uri Lublin <u...@redhat.com> Acked-by: Frediano Ziglio <fzig...@redhat

Re: [Spice-devel] [PATCH usbredirserver] usbredirserver : enable TCP keepalive

2018-03-05 Thread Zhenwei.Pi
Signed-off-by: zhenwei.pi <zhenwei...@youruncloud.com> I think I got completely wrong the problem. So this patch is trying to use tcp keepalives to detect disconnection making possible new connections. The problem is that the server stops accepting connections when it handle one client and ret