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

存在多个port 为 0的用户,但是enable为0,会报错 #47

Open
Scyllaly opened this issue Mar 7, 2018 · 3 comments
Open

存在多个port 为 0的用户,但是enable为0,会报错 #47

Scyllaly opened this issue Mar 7, 2018 · 3 comments

Comments

@Scyllaly
Copy link

Scyllaly commented Mar 7, 2018

如题,最近改进ssrpanel时,做端口自动释放时发现的。
现实需求如下:
1.大量用户已被设置为禁用 enable = 0
2.ssrpanel定时任务自定将这些enable = 0 的用户的 port 置为 0
3.ssrr在启动进程时还是会判断端口是否重复,应当判断enable = 1且 端口重复时才需要抛出错误异常

目前ssrr可以正常跑,就是会一直抛出端口重复error信息

@Scyllaly
Copy link
Author

Scyllaly commented Mar 7, 2018

尝试将 port 字段改为char 类型,则会报类型错误,也尝试将port字段置为null,ssrr进程直接挂掉

@Scyllaly
Copy link
Author

Scyllaly commented Mar 9, 2018

2018-03-09 11:26:17 ERROR db_transfer.py:122 more than one user use the same port [0]
2018-03-09 11:26:17 ERROR db_transfer.py:122 more than one user use the same port [0]
2018-03-09 11:26:17 ERROR db_transfer.py:122 more than one user use the same port [0]
2018-03-09 11:26:17 ERROR db_transfer.py:122 more than one user use the same port [0]
2018-03-09 11:26:17 ERROR db_transfer.py:122 more than one user use the same port [0]

@Scyllaly
Copy link
Author

我已经fork一份,自行更改了db_transfer.py里的sql,问题是ssrr只有启动的时候才不加载这些port = 0的用户,而不是当port=0时自动将这些用户从变量中移除,我觉得也许是我的这个逻辑有问题(主要是我希望保留面板里的用户数据,但是又想释放这些用户的端口)

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

No branches or pull requests

2 participants