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

uvloop strictly needs SO_REUSEPORT #550

Open
mtelka opened this issue Jul 19, 2023 · 0 comments
Open

uvloop strictly needs SO_REUSEPORT #550

mtelka opened this issue Jul 19, 2023 · 0 comments

Comments

@mtelka
Copy link

mtelka commented Jul 19, 2023

uvloop expects that SO_REUSEPORT is supported everywhere. Unfortunately, there are some platforms where SO_REUSEPORT is not supported. For example illumos.

Error message:

uvloop/loop.c: In function '__pyx_gb_6uvloop_4loop_4Loop_57generator3':
uvloop/loop.c:33764:46: error: 'SO_REUSEPORT' undeclared (first use in this function); did you mean 'SO_REUSEADDR'?
33764 |             __pyx_t_5 = __Pyx_PyInt_From_int(SO_REUSEPORT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1778, __pyx_L32_error)
      |                                              ^~~~~~~~~~~~
      |                                              SO_REUSEADDR
uvloop/loop.c:33764:46: note: each undeclared identifier is reported only once for each function it appears in
  • uvloop version: 0.17.0
  • Python version: 3.9.16
  • Platform: OpenIndiana/illumos
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: N/A
  • Does uvloop behave differently from vanilla asyncio? How?: N/A

Could you please detect the SO_REUSEPORT support during build and do not try to use SO_REUSEPORT if it is not available?

Thank you.

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

No branches or pull requests

1 participant