Supply a modified factory with increased pipelining and timeouts.
[quix0rs-apt-p2p.git] / apt-dht.py
index e5288b0a77b7be3731b101dbe572e5f14e1beb63..c8d007982cad455ca9e5dba42bcb601fee170072 100644 (file)
@@ -71,8 +71,8 @@ if not config.getboolean('DEFAULT', 'DHT-only'):
     log.msg('Starting main application server')
     from apt_dht.apt_dht import AptDHT
     myapp = AptDHT(myDHT)
-    site = myapp.getSite()
-    s = strports.service('tcp:'+config.get('DEFAULT', 'port'), channel.HTTPFactory(site))
+    factory = myapp.getHTTPFactory()
+    s = strports.service('tcp:'+config.get('DEFAULT', 'port'), factory)
     s.setServiceParent(application)
 else:
     myDHT.loadConfig(config, config.get('DEFAULT', 'DHT'))