Skip to content

Commit

Permalink
ignore ConnectionRefusedError too
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Aug 12, 2019
1 parent 2e2120f commit 854f0d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/wormhole/_dilation/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from twisted.internet.endpoints import serverFromString
from twisted.internet.protocol import ClientFactory, ServerFactory
from twisted.internet.address import HostnameAddress, IPv4Address, IPv6Address
from twisted.internet.error import ConnectingCancelledError, DNSLookupError
from twisted.internet.error import ConnectingCancelledError, ConnectionRefusedError, DNSLookupError
from twisted.python import log
from .. import ipaddrs # TODO: move into _dilation/
from .._interfaces import IDilationConnector, IDilationManager
Expand Down Expand Up @@ -312,7 +312,9 @@ def _schedule_connection(self, delay, h, is_relay):
d = deferLater(self._reactor, delay,
self._connect, ep, desc, is_relay)
d.addErrback(lambda f: f.trap(ConnectingCancelledError,
CancelledError))
ConnectionRefusedError,
CancelledError,
))
# TODO: HostnameEndpoint.connect catches CancelledError and replaces
# it with DNSLookupError. Remove this workaround when
# https://twistedmatrix.com/trac/ticket/9696 is fixed.
Expand Down

0 comments on commit 854f0d6

Please sign in to comment.