Skip to content

Commit

Permalink
Closing mdns agent (#636)
Browse files Browse the repository at this point in the history
I use the library with many open/close, and I get mdns storms where the webrtc library searches for other nodes over the network in a very aggressive manner.

This has been proposed by @r-byondlabs, and might very well be the problem: if I open/close many connections, and the mdns-agents are not cleaned up, there might be many requests.

Fixes #616
  • Loading branch information
ineiti authored Nov 21, 2024
1 parent fc3a0aa commit ac61f20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ice/src/agent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ impl Agent {
udp_mux.remove_conn_by_ufrag(&ufrag).await;
}

Self::close_multicast_conn(&self.mdns_conn).await;

//FIXME: deadlock here
self.internal.close().await
}
Expand Down
2 changes: 1 addition & 1 deletion sctp/fuzz/fuzz_targets/packet.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;

use webrtc_sctp::packet::Packet;
use bytes::Bytes;
use webrtc_sctp::packet::Packet;

fuzz_target!(|data: &[u8]| {
let bytes = Bytes::from(data.to_vec());
Expand Down
2 changes: 1 addition & 1 deletion sctp/fuzz/fuzz_targets/param.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;

use webrtc_sctp::param::build_param;
use bytes::Bytes;
use webrtc_sctp::param::build_param;

fuzz_target!(|data: &[u8]| {
let bytes = Bytes::from(data.to_vec());
Expand Down

0 comments on commit ac61f20

Please sign in to comment.