Add logging messages on start/stop the publisher

This commit is contained in:
Bo Maryniuk 2017-11-14 17:20:58 +01:00
parent 412f53aea8
commit 9a20d66b87

View File

@ -262,6 +262,7 @@ class SSDPDiscoveryServer(SSDPBase):
'''
listen_ip = self._config.get(self.LISTEN_IP, self.DEFAULTS[self.LISTEN_IP])
port = self._config.get(self.PORT, self.DEFAULTS[self.PORT])
self.log.info('Starting service discovery listener on udp://{0}:{1}'.format(listen_ip, port))
loop = asyncio.get_event_loop()
protocol = SSDPFactory(answer=self._config[self.ANSWER])
if asyncio.ported:
@ -273,7 +274,7 @@ class SSDPDiscoveryServer(SSDPBase):
try:
loop.run_forever()
finally:
self.log.info('Removing SSDP publisher')
self.log.info('Stopping service discovery listener.')
transport.close()
loop.close()