In production we've observer that calls to SetRemoteDescription can block indefinitely. Based on comments from the WebRTC m94 branch this can happen.
file: api/peer_connection_interface.h
// Sets the remote session description.
//
// (Unlike "SDP munging" before SetLocalDescription(), modifying a remote
// offer or answer is allowed by the spec.)
//
// The observer is invoked as soon as the operation completes, which could be
// before or after the SetRemoteDescription() method has exited.
virtual void SetRemoteDescription(
std::unique_ptr<SessionDescriptionInterface> desc,
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer) = 0;
// Like SetRemoteDescription() above, but the observer is invoked with a delay
// after the operation completes. This helps avoid recursive calls by the
// observer but also makes it possible for states to change in-between the
// operation completing and the observer getting called. This makes them racy
// for synchronizing peer connection states to the application.
// TODO(https://crbug.com/webrtc/11798): Delete this method in favor of the
// ones taking SetRemoteDescriptionObserverInterface as argument.
virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
SessionDescriptionInterface* desc) {}
I've implemented the api using the SetRemoteDescriptionObserverInterface. Looking for feedback to this change.
HI,
In production we've observer that calls to
SetRemoteDescription
can block indefinitely. Based on comments from the WebRTC m94 branch this can happen.I've implemented the api using the
SetRemoteDescriptionObserverInterface
. Looking for feedback to this change.