Better logging for NOTIFY messages
This commit is contained in:
parent
1bdc167f7a
commit
80486d644d
1 changed files with 1 additions and 1 deletions
|
|
@ -266,7 +266,7 @@ class DiscoveryPlugin(octoprint.plugin.types.StartupPlugin,
|
|||
|
||||
location = "http://{addr}:{port}/plugin/discovery/discovery.xml".format(addr=addr, port=port)
|
||||
|
||||
self.logger.debug("Sending NOTIFY alive")
|
||||
self.logger.debug("Sending NOTIFY {}".format("alive" if alive else "byebye"))
|
||||
notify_message = "".join(["NOTIFY * HTTP/1.1\r\n", "Server: Python/2.7\r\n", "Cache-Control: max-age=900\r\n", "Location: {location}\r\n", "NTS: {nts}\r\n", "NT: upnp:rootdevice\r\n", "USN: uuid:{uuid}::upnp:rootdevice\r\n", "Host: 239.255.255.250:1900\r\n\r\n"])
|
||||
message = notify_message.format(uuid=UUID, location=location, nts="ssdp:alive" if alive else "ssdp:byebye")
|
||||
for _ in xrange(2):
|
||||
|
|
|
|||
Loading…
Reference in a new issue