Skip to content

Fix background commander thread arguments#32

Open
IlyaKochnev wants to merge 2 commits into
hiddify:mainfrom
IlyaKochnev:fix/background-commander-args
Open

Fix background commander thread arguments#32
IlyaKochnev wants to merge 2 commits into
hiddify:mainfrom
IlyaKochnev:fix/background-commander-args

Conversation

@IlyaKochnev

Copy link
Copy Markdown

Summary

  • pass the constructed command to the background thread target
  • prevent every asynchronous commander(...) call from failing with a missing-argument TypeError
  • restore background apply-users execution after user changes in the panel

Root cause

cmd_in_back requires a cmd argument, but the thread was created without args. As a result, the thread failed before spawning common/commander.py, while the caller still returned success.

This left generated service configurations stale. One observed consequence was that a user deleted from the UI remained in Telemt's generated config.toml.

Testing

  • python3 -m py_compile hiddifypanel/panel/run_commander.py

  • git diff --check

  • verified the failure on Hiddify Manager/Panel 12.3.3 from the logged traceback:

    TypeError: cmd_in_back() missing 1 required positional argument: 'cmd'
    

Fixes hiddify/Hiddify-Manager#5498

@rezasabourinejad

Copy link
Copy Markdown

already mentioned 2 weeks ago here:
#30
nice to check PR

@hiddify-com
@pjrobertson

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

Successfully merging this pull request may close these issues.

3 participants