mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-09 17:49:56 +00:00
chore: allow embedded xsync.Map to be lazily initialized
This commit is contained in:
@@ -14,7 +14,6 @@ var DefaultManager *Manager
|
||||
|
||||
func init() {
|
||||
DefaultManager = &Manager{
|
||||
connections: xsync.NewMap[string, Tracker](),
|
||||
uploadTemp: atomic.NewInt64(0),
|
||||
downloadTemp: atomic.NewInt64(0),
|
||||
uploadBlip: atomic.NewInt64(0),
|
||||
@@ -28,7 +27,7 @@ func init() {
|
||||
}
|
||||
|
||||
type Manager struct {
|
||||
connections *xsync.Map[string, Tracker]
|
||||
connections xsync.Map[string, Tracker]
|
||||
uploadTemp atomic.Int64
|
||||
downloadTemp atomic.Int64
|
||||
uploadBlip atomic.Int64
|
||||
|
||||
Reference in New Issue
Block a user