Reuse socket in httpserver

This commit is contained in:
def 2015-02-24 16:36:37 +01:00
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)