对接
This commit is contained in:
@@ -480,6 +480,27 @@ func TestClosedSupersededPeerConnectionDoesNotRemovePeer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestClosedCurrentPeerConnectionDoesNotRemoveSignalingPeer(t *testing.T) {
|
||||
pc, err := webrtc.NewPeerConnection(webrtc.Configuration{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer pc.Close()
|
||||
|
||||
p := &peer{pc: pc}
|
||||
manager := &Manager{}
|
||||
manager.handleICEConnectionStateChange(p, pc, webrtc.ICEConnectionStateClosed)
|
||||
|
||||
cleanupAvailable := false
|
||||
p.cleanup.Do(func() { cleanupAvailable = true })
|
||||
if !cleanupAvailable {
|
||||
t.Fatal("closed media connection consumed signaling peer cleanup")
|
||||
}
|
||||
if !p.hasPeerConnection(pc) {
|
||||
t.Fatal("closed media connection removed signaling peer before renegotiation")
|
||||
}
|
||||
}
|
||||
|
||||
var _ platformws.Hub = (*liveHubStub)(nil)
|
||||
|
||||
func TestNewPionAPIRejectsConflictingUDPConfiguration(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user