Skip to content

Commit

Permalink
Merge pull request #130 from david415/fix-tor-client
Browse files Browse the repository at this point in the history
Teach tor endpoint to only return ConnectionRefusedError
  • Loading branch information
meejah committed Oct 9, 2015
2 parents 0ed0fd2 + 3091f54 commit 89a9159
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion txtorcon/endpoints.py
Expand Up @@ -26,6 +26,7 @@
from twisted.internet import error
from twisted.plugin import IPlugin
from twisted.python.util import FancyEqMixin
from twisted.internet.error import ConnectionRefusedError

from zope.interface import implementer
from zope.interface import Interface, Attribute
Expand Down Expand Up @@ -711,7 +712,7 @@ def _retry_socks_port(self, failure):
try:
self.socks_port = self._socks_port_iter.next()
except StopIteration:
return failure
return defer.fail(ConnectionRefusedError('tor socks port retry failed'))
d = self._try_connect()
d.addErrback(self._retry_socks_port)
return d
Expand Down

0 comments on commit 89a9159

Please sign in to comment.