httpd: add scope block
This commit is contained in:
parent
eb7389f152
commit
9d23d3454c
1 changed files with 5 additions and 0 deletions
5
httpd.d
5
httpd.d
|
@ -22,6 +22,11 @@ main(string[] args)
|
||||||
listener.bind(new InternetAddress("127.0.0.1", 80));
|
listener.bind(new InternetAddress("127.0.0.1", 80));
|
||||||
listener.listen(32);
|
listener.listen(32);
|
||||||
|
|
||||||
|
scope (exit) {
|
||||||
|
listener.shutdown(SocketShutdown.BOTH);
|
||||||
|
listener.close();
|
||||||
|
}
|
||||||
|
|
||||||
readSet = new SocketSet();
|
readSet = new SocketSet();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue