From df212efc271bf5e20c9999cb0a5e4d0344063aaa Mon Sep 17 00:00:00 2001 From: Benjamin Date: Thu, 11 Jul 2024 13:55:35 -0500 Subject: [PATCH] bugfix: swap options variable name in listen (#180) --- src/socketify/socketify.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/socketify/socketify.py b/src/socketify/socketify.py index 6ddc68e..e670486 100644 --- a/src/socketify/socketify.py +++ b/src/socketify/socketify.py @@ -3315,10 +3315,10 @@ async def task_wrapper(task): native_options = ffi.new("uws_app_listen_config_t *") options = native_options[0] port = port_or_options.get("port", 0) - options = port_or_options.get("options", 0) + options_ = port_or_options.get("options", 0) host = port_or_options.get("host", "0.0.0.0") options.port = ( - ffi.cast("int", port, 0) + ffi.cast("int", port) if isinstance(port, int) else ffi.cast("int", 0) ) @@ -3328,8 +3328,8 @@ async def task_wrapper(task): else ffi.NULL ) options.options = ( - ffi.cast("int", port) - if isinstance(options, int) + ffi.cast("int", options_) + if isinstance(options_, int) else ffi.cast("int", 0) ) self.native_options_listen = native_options # Keep alive native_options