mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
zeroconf API change
This commit is contained in:
parent
8f01d1b05f
commit
939e2f6bdd
1 changed files with 2 additions and 5 deletions
|
|
@ -179,12 +179,9 @@ def unpublish(desc, service_type, port, properties=None, add_hostname=True, wait
|
|||
'''
|
||||
server = start_server()
|
||||
service = create_service(desc, service_type, port, properties, add_hostname)
|
||||
num_services = len(server.registry.async_get_service_infos())
|
||||
server.unregister_service(service)
|
||||
try:
|
||||
no_services = len(server.registry.services) == 0
|
||||
except AttributeError:
|
||||
no_services = len(server.services) == 0
|
||||
if no_services:
|
||||
if num_services < 2:
|
||||
stop_server(wait_for_stop=wait_for_stop)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue