Merge pull request #10545 from SomberNight/202603_commands_getsockname
daemon: (trivial) CommandsServer.run: move tcp-specific line
This commit is contained in:
+1
-1
@@ -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})")
|
||||
|
||||
Reference in New Issue
Block a user