driveby cleanup (#3017)

* driveby cleanup

* test
This commit is contained in:
Paul Wells
2024-09-18 00:45:55 -07:00
committed by GitHub
parent f21bc84967
commit 1436a1f186
7 changed files with 9 additions and 30 deletions

View File

@@ -555,13 +555,7 @@ func (c *RTCClient) sendRequest(msg *livekit.SignalRequest) error {
}
func (c *RTCClient) SendIceCandidate(ic *webrtc.ICECandidate, target livekit.SignalTarget) error {
var icQueue *atomic.Pointer[webrtc.ICECandidate]
if target == livekit.SignalTarget_PUBLISHER {
icQueue = &c.icQueue[0]
} else {
icQueue = &c.icQueue[1]
}
prevIC := icQueue.Swap(ic)
prevIC := c.icQueue[target].Swap(ic)
if prevIC == nil {
return nil
}