Skip to content

Commit c69397b

Browse files
committed
Try and figure out why it works on successful case but not error case
(not successful)
1 parent f51e1fe commit c69397b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

synapse/app/_base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,10 @@ def listen_http(
489489
# the site when things go wrong. In the normal case, a `Port` is created which
490490
# we can call `Port.stopListening()` on to do the same thing (but no `Port` is
491491
# created when an error occurs).
492-
site.doStop()
493-
raise Exception("asdf failed to listen") from exc
492+
# site.doStop()
493+
site.stopFactory()
494+
# raise Exception("asdf failed to listen") from exc
495+
raise Exception("asdf") from None
494496

495497
return ports
496498

synapse/http/site.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def stopFactory(self) -> None:
817817

818818
# Replace the resource tree with an empty resource to break circular references
819819
# to the resource tree which holds a bunch of homeserver references.
820-
self.resource = Resource()
820+
# self.resource = Resource()
821821

822822
def log(self, request: SynapseRequest) -> None: # type: ignore[override]
823823
pass

0 commit comments

Comments
 (0)