Disable active TCP by rolling back to ICE v2.3.3 (#1735)
* Revert "Disable active TCP (#1726)"
This reverts commit 5260907ffe.
* Disable active TCP by rolling back to ICE v2.3.3
This commit is contained in:
+5
-15
@@ -1478,16 +1478,11 @@ func (t *PCTransport) handleLocalICECandidate(e *event) error {
|
||||
c := e.data.(*webrtc.ICECandidate)
|
||||
|
||||
filtered := false
|
||||
if c != nil {
|
||||
if t.preferTCP.Load() && c.Protocol != webrtc.ICEProtocolTCP {
|
||||
cstr := c.String()
|
||||
t.params.Logger.Debugw("filtering out local candidate", "candidate", cstr)
|
||||
t.filteredLocalCandidates = append(t.filteredLocalCandidates, cstr)
|
||||
filtered = true
|
||||
} else if c.Protocol == webrtc.ICEProtocolTCP && c.TCPType == ice.TCPTypeActive.String() {
|
||||
// SFU should not support TCP active candidates. clients should connect to us
|
||||
filtered = true
|
||||
}
|
||||
if t.preferTCP.Load() && c != nil && c.Protocol != webrtc.ICEProtocolTCP {
|
||||
cstr := c.String()
|
||||
t.params.Logger.Debugw("filtering out local candidate", "candidate", cstr)
|
||||
t.filteredLocalCandidates = append(t.filteredLocalCandidates, cstr)
|
||||
filtered = true
|
||||
}
|
||||
|
||||
if filtered {
|
||||
@@ -1517,11 +1512,6 @@ func (t *PCTransport) handleRemoteICECandidate(e *event) error {
|
||||
t.params.Logger.Debugw("filtering out remote candidate", "candidate", c.Candidate)
|
||||
t.filteredRemoteCandidates = append(t.filteredRemoteCandidates, c.Candidate)
|
||||
filtered = true
|
||||
} else if candidate, err := ice.UnmarshalCandidate(c.Candidate); err == nil {
|
||||
if candidate != nil && candidate.TCPType() == ice.TCPTypePassive {
|
||||
// SFU should ignore client's passive TCP, so Pion doesn't attempt to connect to it
|
||||
filtered = true
|
||||
}
|
||||
}
|
||||
|
||||
if filtered {
|
||||
|
||||
Reference in New Issue
Block a user