Staticcheck (#464)
Using `go get -u honnef.co/go/tools/cmd/staticcheck` Uneaarthed a couple of real bugs
This commit is contained in:
@@ -68,7 +68,7 @@ func RoomStarted() {
|
||||
|
||||
func RoomEnded(startedAt time.Time) {
|
||||
if !startedAt.IsZero() {
|
||||
promRoomDuration.Observe(float64(time.Now().Sub(startedAt)) / float64(time.Second))
|
||||
promRoomDuration.Observe(float64(time.Since(startedAt)) / float64(time.Second))
|
||||
}
|
||||
promRoomTotal.Sub(1)
|
||||
atomic.AddInt32(&atomicRoomTotal, -1)
|
||||
|
||||
@@ -287,8 +287,6 @@ func (stats *Stats) coalesce() {
|
||||
|
||||
// update currentStats
|
||||
stats.curStats = &curStats
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// find delta between curStats and prevStats and prepare proto payload
|
||||
|
||||
Reference in New Issue
Block a user