Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit fb56dfd

Browse files
authored
Fix SIGHUP handler (#8697)
Fixes: ``` builtins.TypeError: _reload_logging_config() takes 1 positional argument but 2 were given ```
1 parent c3119d1 commit fb56dfd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

changelog.d/8697.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Re-organize the structured logging code to separate the TCP transport handling from the JSON formatting.

synapse/app/_base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def register_sighup(func, *args, **kwargs):
4949
5050
Args:
5151
func (function): Function to be called when sent a SIGHUP signal.
52-
Will be called with a single default argument, the homeserver.
5352
*args, **kwargs: args and kwargs to be passed to the target function.
5453
"""
5554
_sighup_callbacks.append((func, args, kwargs))
@@ -251,13 +250,13 @@ def handle_sighup(*args, **kwargs):
251250
sdnotify(b"RELOADING=1")
252251

253252
for i, args, kwargs in _sighup_callbacks:
254-
i(hs, *args, **kwargs)
253+
i(*args, **kwargs)
255254

256255
sdnotify(b"READY=1")
257256

258257
signal.signal(signal.SIGHUP, handle_sighup)
259258

260-
register_sighup(refresh_certificate)
259+
register_sighup(refresh_certificate, hs)
261260

262261
# Load the certificate from disk.
263262
refresh_certificate(hs)

0 commit comments

Comments
 (0)