dom96 / httpbeast

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

alternative to https://github.com/dom96/httpbeast/pull/50 using `failOnExistingPort` #52

Closed timotheecour closed 3 years ago

timotheecour commented 3 years ago

alternative to https://github.com/dom96/httpbeast/pull/50

Note that I still consider https://github.com/dom96/httpbeast/pull/50 a better approach, as discussed here https://github.com/dom96/httpbeast/pull/50#discussion_r670042384 (it was cleaner and not subject to TOCTOU when numThreads=1 and pre-existing code already was ignoring reusePort in the case when httpbeast)

after this PR, https://github.com/dom96/jester/pull/281 should be merged to allow forwarding jester.reusePort as httpbeast.failOnExistingPort