-
Notifications
You must be signed in to change notification settings - Fork 3
Filter and buffering ice candidates (#49) #50
Conversation
- filter ICE candidates with empty candidate
- add test for exchanging of ICE candidates between two peers
FCM
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jason/tests/peer/mod.rs
Outdated
}); | ||
|
||
handle_ice_candidates(rx2, peer1_clone, 2) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kirguir ,
add_ice_candidate_before_precess_offer
и add_ice_candidate_before_precess_answer
завершаются не потому, что было получено N кандидатов, а потому, что дропаются пиры, содержащие tx'ы, что ведет к закрытию стрима в handle_ice_candidates.
Чинится мувом пиров в handle_ice_candidate(..).map(move |_| let _ = peer )
jason/tests/peer/mod.rs
Outdated
) | ||
.map_err(|_| assert!(false)), | ||
); | ||
added += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kirguir ,
Лучше инкрементить в add_ice_candidate().map()
, дабы быть уверенным что этот промис успеет выполнится.
# Conflicts: # .env # .travis.yml # Cargo.lock # Makefile # jason/src/peer/mod.rs
# Conflicts: # .env # .travis.yml # Makefile # jason/src/peer/mod.rs # jason/tests/peer/mod.rs # jason/tests/web.rs # src/shutdown.rs
jason/tests/peer/mod.rs
Outdated
use futures::{ | ||
future::{self, IntoFuture}, | ||
sync::mpsc::{unbounded, UnboundedReceiver}, | ||
Future, Stream, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If trait doesn't used by name explicitly, you should not pollute the current namespace and import it via as _
.
jason/tests/peer/mod.rs
Outdated
|
||
use futures::{ | ||
future::{self, IntoFuture}, | ||
sync::mpsc::{unbounded, UnboundedReceiver}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not hesitate to use mpsc::unbounded
instead of just unbounded
. It's still quite ergonomic while much more informative.
src/signalling/room.rs
Outdated
warn!("Empty candidate from Peer: {}, ignoring", peer_id); | ||
let fut: Box< | ||
dyn ActorFuture<Actor = _, Item = _, Error = _>, | ||
> = Box::new(actix::fut::ok(())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a shorter alias above: ActFuture<I, E>
.
Resolves #49
Synopsis
Receive error if add ICE candidate with empty candidate.
Solution
Filter ICE candidates with empty candidates on server.
Checklist
WIP:
prefixk::
labels appliedWIP:
prefix is removed