Skip to content

Commit

Permalink
bugfix: swap options variable name in listen (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiPythonx authored Jul 11, 2024
1 parent 2a398a3 commit df212ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/socketify/socketify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -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
Expand Down

0 comments on commit df212ef

Please sign in to comment.