]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - xmlrpcclient.py
automatically check responses to make sure it's from the node
[quix0rs-apt-p2p.git] / xmlrpcclient.py
index 5c8f3cf2565329cc235cf9f598e296c86eb3abd4..cc4d2888b6576843896fda3f89fea4a686a5272a 100644 (file)
@@ -3,6 +3,7 @@ from twisted.protocols.http import HTTPClient
 from twisted.internet.defer import Deferred
 
 from xmlrpclib import loads, dumps
+import socket
 
 USER_AGENT = 'Python/Twisted XMLRPC 0.1'
 class XMLRPCClient(HTTPClient):
@@ -41,3 +42,6 @@ class XMLRPCClientFactory(ClientFactory):
        prot.args = self.args
        prot.d = self.d
        return prot
+
+    def clientConnectionFailed(self, connector, reason):
+       self.d.errback()
\ No newline at end of file