Skip to content

Commit

Permalink
🎨 4.1.3: -t parameter will not be necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
AirportR committed Feb 5, 2024
1 parent fafc3da commit e07b20d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/websocket/ws_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,13 @@ def check_args():
GCONFIG.yaml['websocket'] = wsconf
GCONFIG.reload()
logger.info(f"已覆写监听地址:{bindaddr}")
wsconf = GCONFIG.config.get('websocket', {})
if args.token:
wstoken = str(args.token)
else:
wstoken = generate_random_string()
wsconf = GCONFIG.config.get('websocket', {})
wstoken = wsconf.get('token', '')
if not wstoken:
wstoken = generate_random_string()
wsconf['token'] = wstoken
GCONFIG.yaml['websocket'] = wsconf
GCONFIG.reload()
Expand Down

0 comments on commit e07b20d

Please sign in to comment.