bjoern
bjoern copied to clipboard
unix sockets aren't released on SIGHUP
I'm on macOS 11.5.2. After stopping the server via SIGHUP and then starting again on the same Unix socket I get the following error:
OSError: [Errno 48] Address already in use
Is this expected? I currently have to keep changing the Unix socket path every time I restart the server from my IDE.
Not expected, PR welcome.
Hi, what is not expected? Is it normal to not release a port after the process terminates? I think no. If it must be done could you point the part of the code to be modified ? Thanks
I think, for example, you can use the ev_signal_on_sigint
function
https://github.com/jonashaag/bjoern/blob/4297a64bf0ed9e37788cef573dcce582170960d1/bjoern/server.c#L119