Skip to content

Commit

Permalink
Compare with errors.Is
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonVerkada committed Feb 2, 2024
1 parent 9ae37d2 commit 372c0a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion icegatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package webrtc

import (
"errors"
"fmt"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -192,7 +193,7 @@ func (g *ICEGatherer) Close() error {

if g.agent == nil {
return nil
} else if err := g.agent.Close(); err != nil && err != ice.ErrClosed {
} else if err := g.agent.Close(); err != nil && !errors.Is(err, ice.ErrClosed) {
return err
}

Expand Down

0 comments on commit 372c0a2

Please sign in to comment.