[Spice-devel] [PATCHv2 spice-gtk] session: timeout after 10s of socket connect() attempt

Marc-André Lureau mlureau at redhat.com
Tue May 14 04:15:53 PDT 2013


Hi

----- Mensaje original -----
> hi,
> i have send a mail to ask why server is not aware of client's disconnection,
> nor client side. both think the connection is good.
> i test via unplug cable. look at result after unplug cable.
> why is that?
> thanks
> server:
> tcp 0 392 192.168.5.240:5903 192.168.5.163:60029 ESTABLISHED 31315/qemu-kvm
> tcp 0 0 192.168.5.240:5903 192.168.5.163:60033 ESTABLISHED 31315/qemu-kvm
> tcp 0 0 192.168.5.240:5903 192.168.5.163:60028 ; ESTABLISHED 31315/qemu-kvm
> tcp 0 0 192.168.5.240:5903 192.168.5.163:60019 ESTABLISHED 31315/qemu-kvm
> tcp 0 0 192.168.5.240:5903 192.168.5.163:60027 ESTABLISHED 31315/qemu-kvm
> tcp 0 0 192.168.5.240:5903 192.168.5.163:60032 ESTABLISHED 31315/qemu-kvm
> tcp 0 0 192.168.5.240:5903 192.168.5.163:60031 ESTABLISHED 31315/qemu-kvm
> client:
> tcp &nbs p;0 0 192.168.5.163:60028 192.168.5.240:5903 ESTABLISHED 3915/window
> tcp 0 0 192.168.5.163:60031 192.168.5.240:5903 ESTABLISHED 3915/window
> tcp 0 0 192.168.5.163:60032 192.168.5.240:5903 ESTABLISHED 3915/window
> tcp 0 0 192.168.5.163:60033 192.168.5.240:5903 ESTABLISHED 3915/window
> tcp 0 0 192.168.5.163:60019 192.168.5.240:5903 ESTABLISHED 3915/window
> tcp 0 0 192.168.5.163:60027 192.168.5.240:5903 ESTABLISHED 3915/window
> tcp 0 0 192.168.5.163:60029 192.168.5.240:5903 ESTABLISHED 3915/window

Afaik, this is due to the nature of TCP connections. You can be physically
disconnected for a while, but your TCP session will stay up.

We'd need Spice to do generate a minimum of traffic on idle connection to
detect that. Why not using SO_KEEPALIVE which seems to be right for the job?


More information about the Spice-devel mailing list