mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Implement MSC1708 (.well-known lookups for server routing) (#4489)
This commit is contained in:
parent
2562319821
commit
99e36d5e24
23 changed files with 470 additions and 21 deletions
|
@ -354,6 +354,11 @@ class FakeTransport(object):
|
|||
:type: twisted.internet.interfaces.IReactorTime
|
||||
"""
|
||||
|
||||
_protocol = attr.ib(default=None)
|
||||
"""The Protocol which is producing data for this transport. Optional, but if set
|
||||
will get called back for connectionLost() notifications etc.
|
||||
"""
|
||||
|
||||
disconnecting = False
|
||||
buffer = attr.ib(default=b'')
|
||||
producer = attr.ib(default=None)
|
||||
|
@ -364,8 +369,12 @@ class FakeTransport(object):
|
|||
def getHost(self):
|
||||
return None
|
||||
|
||||
def loseConnection(self):
|
||||
self.disconnecting = True
|
||||
def loseConnection(self, reason=None):
|
||||
logger.info("FakeTransport: loseConnection(%s)", reason)
|
||||
if not self.disconnecting:
|
||||
self.disconnecting = True
|
||||
if self._protocol:
|
||||
self._protocol.connectionLost(reason)
|
||||
|
||||
def abortConnection(self):
|
||||
self.disconnecting = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue