Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior on run() #57

Open
waghanza opened this issue Aug 18, 2021 · 4 comments
Open

Inconsistent behavior on run() #57

waghanza opened this issue Aug 18, 2021 · 4 comments
Labels

Comments

@waghanza
Copy link

Hi @dom96,

When specifying settings (port, bind address, ...), the domain is set to AF_UNSPEC. However, without settings, the domain is set to AF_INET

This make

proc run*(onRequest: OnRequest, settings: Settings) =

and
proc run*(onRequest: OnRequest) {.inline.} =

have different behavior (except if we specify domain for the first one)

Regards,


Related to the-benchmarker/web-frameworks#4554

@dom96
Copy link
Owner

dom96 commented Aug 23, 2021

Will keep this to remind me to add an error when Settings is initialised incorrectly.

@dom96 dom96 reopened this Aug 23, 2021
@dom96 dom96 added the bug label Jun 10, 2022
@waghanza
Copy link
Author

How can you override Settings @dom96 ?

@dom96
Copy link
Owner

dom96 commented Nov 25, 2022

@waghanza
Copy link
Author

exactly, but seems that you need to set by hand in https://github.com/mattaylor/whip/blob/a9fd1f04ba0167727dd0dbf9235791f708147992/whip.nim#L132 @mattaylor

@dom96 maybe a good idea to allow it to be overwritten by end-user (I mean with a compilation option or nim.cfg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants