mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
better checks on receiveOffer (#11)
This commit is contained in:
parent
b1e76420bd
commit
490b8b33b7
3 changed files with 30 additions and 25 deletions
|
@ -51,7 +51,9 @@ class ProxyPair
|
|||
@client = channel
|
||||
|
||||
receiveWebRTCOffer: (offer) ->
|
||||
console.assert 'offer' == offer.type
|
||||
if 'offer' != offer.type
|
||||
log 'Invalid SDP received -- was not an offer.'
|
||||
return false
|
||||
try
|
||||
err = @pc.setRemoteDescription offer
|
||||
catch e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue