mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
add and use a thread-safe way of reading router internal state, and include active sessions in the admin query
This commit is contained in:
@@ -37,7 +37,7 @@ func (ps *peers) putPorts(ports map[switchPort]*peer) {
|
||||
}
|
||||
|
||||
type peer struct {
|
||||
// Rolling approximation of bandwidth, in bps, used by switch, updated by tcp
|
||||
// Rolling approximation of bandwidth, in bps, used by switch, updated by packet sends
|
||||
// use get/update methods only! (atomic accessors as float64)
|
||||
bandwidth uint64
|
||||
// BUG: sync/atomic, 32 bit platforms need the above to be the first element
|
||||
|
||||
Reference in New Issue
Block a user