Be able to properly close the underlying socket for a server
dinosaure opened this issue · 1 comments
dinosaure commented
With tcpip.unix
, when we start a TCP/IP server on a specific port and we want to delete it (like Lwt_unix.close
), the current implementation does not properly do that. Then, if we start a new TCP/IP service on the same address/port, we got an EADDRINUSE
because the underlying old (closed?) socket still is bound on the same addr:port
.
For the use case, if we want to download a let's encrypt certificate (and launch a simple HTTP server to do the challenge) and start then our proper HTTP + HTTPS server, we got this error with mirage configure -t unix
.