ITD does not send packet to stop updates #45
Labels
No Label
Bug
Cantfix
Duplicate
Enhancement
External
Help Wanted
In Progress
Invalid
Question
Waiting
Waiting For Info
Waiting for Upstream
Wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Elara6331/itd#45
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, I was inspecting ITD's traffic using Wireshark and noticed that when the 'watch' command was issued a packet would be sent to tell the watch to start sending back updates as expected. But when the command was stopped using Ctl-C the watch continued to send updates back with nothing to tell the watch to stop sending the updates. It isn't great for battery life if the watch continues to send updates even when ITD doesn't want them.
Here is a mock-up of what was happening:
itctl watch motion
Computer -> Watch: Please send me updates on the motion
Watch -> Computer: OK
Watch -> Computer: Update
Watch -> Computer: Update
Watch -> Computer: Update
Watch -> Computer: Update
Command exited using Ctl-C
The computer should tell the watch to stop sending updates but it doesn't.
Watch -> Computer: Update
Watch -> Computer: Update
Watch -> Computer: Update
Watch -> Computer: Update
Watch -> Computer: Update
...
Do you have metrics enabled in ITD's config? Also, can you run ITD with
ITD_LOGGING_LEVEL=debug
and send the output here?I looked in the config file in etc and metrics were set to disable.
Running with
ITD_LOGGING_LEVEL=debug
Logs this once I start the watch command and nothing when it exits using Ctl-CWhen the
itd
daemon (Not theitctl watch
command) exits, it logs:Here is the entire log:
Interesting. Ctrl+C in
itctl
should've canceled the context and that in turn should've sent the done signal to ITD. Yeah, if ITD never got the done signal, then it makes sense why it never stopped. I'll have to look into why it's not being sent.This should be fixed in the latest commit of
itd
anditctl
(you need to update both because the socket protocol has changed). Can you please test it?I'm going to close this due to inactivity, but it should be working fine now.