Reuse socket in httpserver

This commit is contained in:
def
2015-02-24 16:36:37 +01:00
parent 752052e903
commit 3cd79faad3

View File

@@ -363,7 +363,7 @@ proc run*(handleRequest: proc (client: Socket,
port = Port(80)) =
## encapsulates the server object and main loop
var s: TServer
open(s, port)
open(s, port, reuseAddr = true)
#echo("httpserver running on port ", s.port)
while true:
next(s)