Upgrade to golangci-lint@v2

This commit is contained in:
Joe Turki
2025-08-16 18:24:54 +03:00
parent 941b7413fa
commit 22cf05c358
2 changed files with 3 additions and 9 deletions

View File

@@ -2089,7 +2089,7 @@ func (pc *PeerConnection) AddTrack(track TrackLocal) (*RTPSender, error) {
// But that will cause sdp inflate. So we only check currentDirection's current value,
// that's worked for all browsers.
if transceiver.kind == track.Kind() && transceiver.Sender() == nil &&
!(currentDirection == RTPTransceiverDirectionSendrecv || currentDirection == RTPTransceiverDirectionSendonly) {
currentDirection != RTPTransceiverDirectionSendrecv && currentDirection != RTPTransceiverDirectionSendonly {
sender, err := pc.api.NewRTPSender(track, pc.dtlsTransport)
if err == nil {
err = transceiver.SetSender(sender, track)

View File

@@ -78,20 +78,14 @@ func TestPeerConnection_Close_PreICE(t *testing.T) {
assert.NoError(t, pcAnswer.SetRemoteDescription(answer))
for {
if pcAnswer.iceTransport.State() == ICETransportStateChecking {
break
}
for pcAnswer.iceTransport.State() != ICETransportStateChecking {
time.Sleep(time.Second / 4)
}
assert.NoError(t, pcAnswer.Close())
// Assert that ICETransport is shutdown, test timeout will prevent deadlock
for {
if pcAnswer.iceTransport.State() == ICETransportStateClosed {
return
}
for pcAnswer.iceTransport.State() != ICETransportStateClosed {
time.Sleep(time.Second / 4)
}
}