fix bug in ServerProtocol
This commit is contained in:
parent
d1ccac1b04
commit
7d5dd1ff51
1 changed files with 3 additions and 4 deletions
|
@ -33,10 +33,9 @@ class ServerProtocol(Protocol):
|
||||||
peer_info = self.transport.getPeer()
|
peer_info = self.transport.getPeer()
|
||||||
self.peer = self.factory.peer_manager.get_peer(peer_info.host, peer_info.port)
|
self.peer = self.factory.peer_manager.get_peer(peer_info.host, peer_info.port)
|
||||||
self.request_handler = ServerRequestHandler(self)
|
self.request_handler = ServerRequestHandler(self)
|
||||||
for query_handler_factory, enabled in self.factory.query_handler_factories.iteritems():
|
for query_handler_factory in self.factory.query_handler_factories.values():
|
||||||
if enabled is True:
|
query_handler = query_handler_factory.build_query_handler()
|
||||||
query_handler = query_handler_factory.build_query_handler()
|
query_handler.register_with_request_handler(self.request_handler, self.peer)
|
||||||
query_handler.register_with_request_handler(self.request_handler, self.peer)
|
|
||||||
log.debug("Setting the request handler")
|
log.debug("Setting the request handler")
|
||||||
self.factory.rate_limiter.register_protocol(self)
|
self.factory.rate_limiter.register_protocol(self)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue