Fix autoconnecting to the default host

This commit is contained in:
Andrew Resch 2012-07-17 17:23:39 -07:00
parent 8e7432e71c
commit 6422f11971

View File

@ -162,7 +162,10 @@ class JSON(resource.Resource, component.Component):
# Sort out getting the default daemon here
default = component.get("DelugeWeb").config["default_daemon"]
host = component.get("Web").get_host(default)
self.connect()
if host:
self.connect(*host[1:])
else:
self.connect()
def _on_client_disconnect(self, *args):
component.get("Web.PluginManager").stop()