[Live-devel] About RTSPServer
Rune Torgersen
runet at innovsys.com
Tue May 24 10:44:27 PDT 2011
> -----Original Message-----
> On 5/24/2011 12:57 AM, RA-Vincent Kao wrote:
> > but socket still exists (check netstat -a).
>
> If you're seeing a TIME_WAIT state, that's normal and unavoidable:
>
> http://tangentsoft.net/wskfaq/articles/debugging-tcp.html
>
> If it's a FIN_WAITx or SYN_x state, one of the ends of the
> connection
> isn't closing down properly. See the state-transition diagram
> linked
> from that article to debug it.
>
> If the core problem is that the server can't restart for some time
> after
> being stopped due to the TIME_WAIT state, add a
> setsockopt(SO_REUSEADDR)
> after the socket() call.
Or call shutdown() on the socket before the close.
More information about the live-devel
mailing list