dom96 / httpbeast

A highly performant, multi-threaded HTTP 1.1 server written in Nim.
MIT License
442 stars 51 forks source link

reusePort = false now default; honored regardless of numThreads #50

Closed timotheecour closed 2 years ago

timotheecour commented 3 years ago

/cc @dom96

before PR

in terminal tab 1:
nim r --threads jester/tests/example.nim

in terminal tab 2:
nim r --threads jester/tests/example.nim # no failure
curl http://0.0.0.0:5000 # sends cmd to 1st server

after PR

in terminal tab 1:
nim r --threads jester/tests/example.nim

in terminal tab 2:
nim r --threads jester/tests/example.nim # fails with: Address already in use

after this PR, https://github.com/dom96/jester/pull/278 can be merged which will allow forwarding reusePort param from jester to httpbeast and honor this flag

(see also https://github.com/nim-lang/Nim/pull/18428 which improves errmsg on nim side)

timotheecour commented 3 years ago

ping @dom96