fix(params_getter): try to bind even if socket exists

This commit is contained in:
Itai Bohadana
2025-09-02 13:14:48 +03:00
parent ab80f41d3f
commit 72223525c4
2 changed files with 2 additions and 1 deletions

View File

@@ -88,6 +88,7 @@ local function get_socket_path(cmd, messages, callback)
else
callback(err_read, data)
end
client:close()
end)
end)
end

View File

@@ -136,12 +136,12 @@ async def serve_socket():
if python_socket_path.exists():
print(python_socket_path)
return
atexit.register(lambda: _close_socket(python_socket_path))
signal.signal(signal.SIGTERM, lambda x, _: _close_socket(python_socket_path))
signal.signal(signal.SIGINT, lambda x, _: _close_socket(python_socket_path))
# signal.signal(signal.SIGKILL, lambda x, _: _close_socket(python_socket_path))
async def handle_client(reader: asyncio.StreamReader, writer: asyncio.StreamWriter):
path = await reader.readline()