mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Total wire data should always be uint64 (fixes #315)
This commit is contained in:
parent
a0b15d006d
commit
2db76ae786
@ -186,8 +186,8 @@ func (m *Model) ConnectionStats() map[string]ConnectionInfo {
|
|||||||
res["total"] = ConnectionInfo{
|
res["total"] = ConnectionInfo{
|
||||||
Statistics: protocol.Statistics{
|
Statistics: protocol.Statistics{
|
||||||
At: time.Now(),
|
At: time.Now(),
|
||||||
InBytesTotal: int(in),
|
InBytesTotal: in,
|
||||||
OutBytesTotal: int(out),
|
OutBytesTotal: out,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,15 +523,15 @@ func (c *rawConnection) processRequest(msgID int, req RequestMessage) {
|
|||||||
|
|
||||||
type Statistics struct {
|
type Statistics struct {
|
||||||
At time.Time
|
At time.Time
|
||||||
InBytesTotal int
|
InBytesTotal uint64
|
||||||
OutBytesTotal int
|
OutBytesTotal uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *rawConnection) Statistics() Statistics {
|
func (c *rawConnection) Statistics() Statistics {
|
||||||
return Statistics{
|
return Statistics{
|
||||||
At: time.Now(),
|
At: time.Now(),
|
||||||
InBytesTotal: int(c.cr.Tot()),
|
InBytesTotal: c.cr.Tot(),
|
||||||
OutBytesTotal: int(c.cw.Tot()),
|
OutBytesTotal: c.cw.Tot(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user