mavlink / mavlink-camera-manager

MAVLink Camera Manager Service
MIT License
103 stars 30 forks source link

src: stream: Completely drop the stream before creating a new one #361

Closed joaoantoniocardoso closed 8 months ago

joaoantoniocardoso commented 8 months ago

Closes #360

The problem was that RTSP was not finished before we tried to recreate it, so the server skipped the new one.

To drop the current StreamState before having a new one, we wrapped it around an Option, allowing us to take and drop it instead of dropping it when dereferencing and overwriting it.