mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Make probetest wait for a datachannel to open
This commit is contained in:
parent
b5ce259858
commit
4663599382
2 changed files with 162 additions and 50 deletions
|
@ -51,7 +51,12 @@ func makePeerConnectionFromOffer(sdp *webrtc.SessionDescription,
|
|||
return nil, fmt.Errorf("accept: NewPeerConnection: %s", err)
|
||||
}
|
||||
pc.OnDataChannel(func(dc *webrtc.DataChannel) {
|
||||
close(dataChan)
|
||||
dc.OnOpen(func() {
|
||||
close(dataChan)
|
||||
})
|
||||
dc.OnClose(func() {
|
||||
dc.Close()
|
||||
})
|
||||
})
|
||||
|
||||
err = pc.SetRemoteDescription(*sdp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue