[mythtv] What happens with connections when a client dies?

Anduin Withers awithers at anduin.com
Thu Feb 24 13:51:08 UTC 2005


> I have noticed that the proper way to close the socket is to call the
> DONE command over the MythProtocol, but I was wandering what effects
> this would have if it weren't done *everytime* (such as when the
> frontend dies in a nasty way).  Do the open connections get 'garbage
> collected' after a certain period of time?

It isn't really time base, Qt should notice the socket is no longer
connected, it emits connectionClosed which will invoke
MainServer::endConnection which removes the socket from any lists it might
be on.

You may want to take a walk through mainserver.cpp and server.cpp as things
like the above, the thread pool, etc, are all there.

I don't think it is perfect but works well enough often enough (I have an
unfounded (ok in my mind founded but I'm not going to admit that) general
mistrust for this portion).

-- 
Anduin Withers



More information about the mythtv-dev mailing list