Reuse socket in httpserver
This commit is contained in:
parent
752052e903
commit
3cd79faad3
1 changed files with 1 additions and 1 deletions
|
|
@ -363,7 +363,7 @@ proc run*(handleRequest: proc (client: Socket,
|
||||||
port = Port(80)) =
|
port = Port(80)) =
|
||||||
## encapsulates the server object and main loop
|
## encapsulates the server object and main loop
|
||||||
var s: TServer
|
var s: TServer
|
||||||
open(s, port)
|
open(s, port, reuseAddr = true)
|
||||||
#echo("httpserver running on port ", s.port)
|
#echo("httpserver running on port ", s.port)
|
||||||
while true:
|
while true:
|
||||||
next(s)
|
next(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue