mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-11 11:45:30 +00:00
socket based sources: close socket stream on unprepare
the socket was otherwise leaked
This commit is contained in:
parent
90cb42fdf9
commit
4abb389269
2 changed files with 4 additions and 0 deletions
|
@ -626,6 +626,8 @@ impl TcpClientSrc {
|
|||
|
||||
self.src_pad.stop_task().await;
|
||||
|
||||
*self.src_pad_handler.0.socket_stream.lock().await = None;
|
||||
|
||||
{
|
||||
let socket = state.socket.take().unwrap();
|
||||
socket.unprepare().await.unwrap();
|
||||
|
|
|
@ -921,6 +921,8 @@ impl UdpSrc {
|
|||
|
||||
self.src_pad.stop_task().await;
|
||||
|
||||
*self.src_pad_handler.0.socket_stream.lock().await = None;
|
||||
|
||||
{
|
||||
let socket = state.socket.take().unwrap();
|
||||
socket.unprepare().await.unwrap();
|
||||
|
|
Loading…
Reference in a new issue