voxl-streamer disconnecting live connection
-
Unsure if the following is expected behaviour, but I doubt it is.
Reproduce:
- Start
voxl-streamerlistening to hires_front_small_encoded - Connect to the stream (e.g.,
ffplay -i rtsp://<voxl ip>:<port>/live) - Confirm that the stream looks good
- Disconnect from the stream (CTRL-C the
ffplaycommand) - Within 60 seconds, re-run the same
ffplaycommand - Observe that the stream looks good but will freeze within 60 seconds (e.g., the command is restarted 15 seconds after initially closing the connection. The new stream will freeze after 45 seconds
- Observe that
voxl-streameroutputsRemoved 1 sessions - Disconnect from the new stream (CTRL-C
ffplay) - Observe that
voxl-streameroutputsRemoved 1 sessionsagain after 60 seconds
Based on behaviour and source code, what I think is happening:
When the first connection is closed,voxl-streamerdetects this and decrements the number of clients. However, it takes 60 seconds for thegstreamersession to time out and close. During this time, if another client connects, there are now 2gstreamersessions and 1voxl-streamerclient. 60 seconds after the first connection is closed, the inactivegstreamersession is cleaned up. Sincevoxl-streamerdoesn't know that this session was already inactive, when it closes,voxl-streamerdecrements its number of clients even though the one client it has still has an activegstreamersession. - Start
-
@jcai, I just tested this. I do see that "Removed 1 sessions" message comes in after ~1 min after the first disconnect, but my second session is not interrupted when this happens.
Please make sure you are using the latest version of
voxl-streamer(you can try from nightly dev build). Also, something to double check, whether the two sessions are coming from the same or different port (maybe if you are using vpn or something, there new session starts from the same client port).Alex