change bandwidth type from int to int64 to prevent overflow

This commit is contained in:
luciole 2022-11-17 14:30:16 +01:00 committed by Cecylia Bocovich
parent 115ba6a745
commit 2c599f8827
No known key found for this signature in database
GPG key ID: 009DE379FD9B7B90
7 changed files with 36 additions and 34 deletions

View file

@ -412,7 +412,7 @@ func (sf *SnowflakeProxy) makePeerConnectionFromOffer(sdp *webrtc.SessionDescrip
log.Printf("close with error generated an error: %v", inerr)
}
}
conn.bytesLogger.AddOutbound(n)
conn.bytesLogger.AddOutbound(int64(n))
if n != len(msg.Data) {
panic("short write")
}