Staticcheck (#464)
Using `go get -u honnef.co/go/tools/cmd/staticcheck` Uneaarthed a couple of real bugs
This commit is contained in:
@@ -717,7 +717,7 @@ func (c *RTCClient) processTrack(track *webrtc.TrackRemote) {
|
||||
c.bytesReceived[pId] += uint64(pkt.MarshalSize())
|
||||
c.lock.Unlock()
|
||||
numBytes += pkt.MarshalSize()
|
||||
if time.Now().Sub(lastUpdate) > 30*time.Second {
|
||||
if time.Since(lastUpdate) > 30*time.Second {
|
||||
logger.Infow("consumed from participant",
|
||||
"track", trackId, "pID", pId,
|
||||
"size", numBytes)
|
||||
|
||||
@@ -96,7 +96,7 @@ func (w *TrackWriter) writeNull() {
|
||||
w.track.WriteSample(sample)
|
||||
}
|
||||
case <-w.ctx.Done():
|
||||
break
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user