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

Cannot stop HiveMind-cli if misconfigured #5

Closed
Ashden opened this issue Apr 4, 2021 · 1 comment
Closed

Cannot stop HiveMind-cli if misconfigured #5

Ashden opened this issue Apr 4, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Ashden
Copy link

Ashden commented Apr 4, 2021

If a user somehow starts the cli with a misconfiguration that doesn't connect, you can't stop the cli (other than killing the process):

Scanning...
2021-04-04 23:42:02.510 - OVOS - __main__:discover_hivemind:36 - INFO - Fetching Node data: wss://172.17.235.39:5678
2021-04-04 23:42:02.511 - OVOS - jarbas_hive_mind.discovery:connect:148 - DEBUG - Connecting to HiveMind websocket @ wss://172.17.235.39:5678
2021-04-04 23:42:02.511 - OVOS - jarbas_hive_mind:secure_connect:68 - INFO - Connecting securely to wss://172.17.235.39:5678

Scanning...
2021-04-04 23:42:12.526 - OVOS - __main__:discover_hivemind:36 - INFO - Fetching Node data: wss://172.17.235.39:5678
2021-04-04 23:42:12.527 - OVOS - jarbas_hive_mind.discovery:connect:148 - DEBUG - Connecting to HiveMind websocket @ wss://172.17.235.39:5678
2021-04-04 23:42:12.527 - OVOS - jarbas_hive_mind:secure_connect:68 - INFO - Connecting securely to wss://172.17.235.39:5678

Scanning...
2021-04-04 23:42:22.538 - OVOS - __main__:discover_hivemind:36 - INFO - Fetching Node data: wss://172.17.235.39:5678
2021-04-04 23:42:22.538 - OVOS - jarbas_hive_mind.discovery:connect:148 - DEBUG - Connecting to HiveMind websocket @ wss://172.17.235.39:5678
2021-04-04 23:42:22.539 - OVOS - jarbas_hive_mind:secure_connect:68 - INFO - Connecting securely to wss://172.17.235.39:5678

^CScanning...
2021-04-04 23:42:32.549 - OVOS - __main__:discover_hivemind:36 - INFO - Fetching Node data: wss://172.17.235.39:5678
2021-04-04 23:42:32.550 - OVOS - jarbas_hive_mind.discovery:connect:148 - DEBUG - Connecting to HiveMind websocket @ wss://172.17.235.39:5678
2021-04-04 23:42:32.550 - OVOS - jarbas_hive_mind:secure_connect:68 - INFO - Connecting securely to wss://172.17.235.39:5678

^C^C^C^C
Scanning...
2021-04-04 23:42:42.560 - OVOS - __main__:discover_hivemind:36 - INFO - Fetching Node data: wss://172.17.235.39:5678
2021-04-04 23:42:42.561 - OVOS - jarbas_hive_mind.discovery:connect:148 - DEBUG - Connecting to HiveMind websocket @ wss://172.17.235.39:5678
2021-04-04 23:42:42.561 - OVOS - jarbas_hive_mind:secure_connect:68 - INFO - Connecting securely to wss://172.17.235.39:5678

Notice the Ctrl-C attempts.

@ChanceNCounter
Copy link

Actual cause, probably:

https://github.com/JarbasHiveMind/HiveMind-core/blob/44ed28587197eab2972646286f353f2e9846a588/jarbas_hive_mind/discovery/__init__.py#L207-L212

While loop with no mechanism for interruption. I think Click can prevent this.

@ChanceNCounter ChanceNCounter added the bug Something isn't working label Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants