Merge pull request #10545 from SomberNight/202603_commands_getsockname

daemon: (trivial) CommandsServer.run: move tcp-specific line
This commit is contained in:
ghost43
2026-03-25 16:43:11 +00:00
committed by GitHub
+1 -1
View File
@@ -327,10 +327,10 @@ class CommandsServer(AuthenticatedServer):
await site.start()
except Exception as e:
raise Exception(f"failed to start CommandsServer at {self._socket_config_str()}. got exc: {e!r}") from None
socket = site._server.sockets[0]
if self.socktype == 'unix':
addr = self.sockpath
elif self.socktype == 'tcp':
socket = site._server.sockets[0]
addr = socket.getsockname()
else:
raise Exception(f"impossible socktype ({self.socktype!r})")