webrtc
webrtc copied to clipboard
UDP socket leaks
I have a program working as a proxy to convert RTSP stream to WebRTC stream so I can visit my cameras on the browser, normally a connection is closed when I close the tab, and I'm monitoring the ICE state to close PeerConnection, every time I call PeerConnection.close().await it complains:
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: INFO avlib::pc_wrapper: close
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: WARN webrtc::peer_connection::peer_connection_internal: Failed to accept RTCP SessionSRTP has been closed
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: WARN webrtc::peer_connection::peer_connection_internal: Failed to accept RTP SessionSRTP has been closed
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: WARN webrtc_ice::agent::agent_internal: [controlled]: Failed to close candidate tcp4 host 192.168.0.28:9: the agent is closed
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: WARN webrtc_ice::agent::agent_internal: [controlled]: Failed to close candidate udp4 host 192.168.0.28:63422: the agent is closed
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: WARN webrtc_ice::agent::agent_internal: [controlled]: Failed to close candidate udp4 srflx 58.250.221.39:63422 related 192.168.0.28:63422: the agent is closed
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: WARN webrtc_ice::agent::agent_internal: [controlled]: Failed to close candidate udp4 relay 112.74.41.31:64537 related 58.250.221.39:63422: the agent is closed
Aug 28 14:46:56 debian10.toybrick rtsp2webrtc[23297]: INFO webrtc_ice::agent::agent_internal: [controlled]: Setting new connection state: Closed
and all the UDP socket is never closed, I have confirmed that by lsof -n -p $pid.