You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lewei: the stop command never reaches the toy #269
What happens: Lewei.Client.run() writes CMD_STOP (command 3) only after its read loop ends normally. A session never ends that way: RtspSession.stop() closes the client and its socket, and any other end is an exception. So the write is not reached, and the toy learns that the session is over only from the TCP close. docs/toys.md lists command 3 as the one that ends the stream.
Why it was not fixed in #267: the current behaviour is the one checked on a real VISUO drone in #262, where video plays. It has not been checked how the toy behaves on a quick stop and start.
The catch in the fix: close() cannot just write the command, because stop() may run on the UI thread. If close() only sets a flag, run() sends the command and closes the socket itself, up to one read tick (200 ms) later. By then a new session may have started, so a late stop from the old connection could end the new stream. Whether it does depends on the toy.
To find out, with a toy or a report
Does restarting a slot quickly ever fail or take long without the stop command? If not, removing the unreachable write and correcting the docs may be enough.
If it does, does a stop on the old connection affect a stream already started on a new one?
Activity