diff --git a/httpd.d b/httpd.d index 488262d..0c99cd5 100644 --- a/httpd.d +++ b/httpd.d @@ -22,6 +22,11 @@ main(string[] args) listener.bind(new InternetAddress("127.0.0.1", 80)); listener.listen(32); + scope (exit) { + listener.shutdown(SocketShutdown.BOTH); + listener.close(); + } + readSet = new SocketSet(); while (true) {