[avahi] Published service still browseable in other machines even if network it's down

José Félix Ontañón felixonta at gmail.com
Wed Nov 4 14:35:05 PST 2009


Hi everyone!

I'm a newbie playing with python-avahi trying to code some kind of
master-slave application for shutdown every machine at same time.
When the master it's ordered to shutdown, it sends the signal to the slaves.
The slaves publish/unpublish the service via avahi, and the master
discover them via ItemNew/ItemRemove signals. Very strait-forward, isn't?

The avahi publish/unpublish/discover services it's gorgeous but i've found
that if a slave, that has published the service via avahi, losts it
network (i.e. the wifi ap goes out of power), the master still discovering
it! and no ItemRemove signal it's raised at all. Is it normal? Am i doing
something wrong?

To solve it, i've implemented some kind of "ping" to the slaves service
every Xseconds. When a new slave it's discovered, the periodic ping starts.
When ping it's failing i know there be some problem with networking.

I wonder if avahi itself provides a native workaround to avoid the coding of
those nasty "ping" cycles ...

Cheers!

-- 
http://nosigasleyendo.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/avahi/attachments/20091104/d40bd480/attachment.html 


More information about the avahi mailing list