reminder how ConnectionService should fail if first attempt fails
This commit is contained in:
parent
fcdcf30ba8
commit
9a2d992815
|
@ -1,4 +1,19 @@
|
|||
digraph {
|
||||
/* note: this is nominally what we want from the machine that
|
||||
establishes the WebSocket connection (and re-establishes it when it
|
||||
is lost). We aren't using this yet; for now we're relying upon
|
||||
twisted.application.internet.ClientService, which does reconnection
|
||||
and random exponential backoff.
|
||||
|
||||
The one thing it doesn't do is fail entirely when the first
|
||||
connection attempt fails, which I think would be good for usability.
|
||||
If the first attempt fails, it's probably because you don't have a
|
||||
network connection, or the hostname is wrong, or the service has
|
||||
been retired entirely. And retrying silently forever is not being
|
||||
honest with the user.
|
||||
|
||||
So I'm keeping this diagram around, as a reminder of how we'd like
|
||||
to modify ClientService. */
|
||||
|
||||
|
||||
/* ConnectionMachine */
|
||||
|
|
|
@ -78,6 +78,7 @@ class RendezvousConnector(object):
|
|||
f.setProtocolOptions(autoPingInterval=60, autoPingTimeout=600)
|
||||
p = urlparse(self._url)
|
||||
ep = self._make_endpoint(p.hostname, p.port or 80)
|
||||
# TODO: change/wrap ClientService to fail if the first attempt fails
|
||||
self._connector = internet.ClientService(ep, f)
|
||||
|
||||
def set_trace(self, f):
|
||||
|
|
Loading…
Reference in New Issue
Block a user