mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
fix: SYS_SENSORS context error (#643)
This commit is contained in:
@@ -33,6 +33,7 @@ type Agent struct {
|
||||
|
||||
func NewAgent() *Agent {
|
||||
agent := &Agent{
|
||||
sensorsContext: context.Background(),
|
||||
fsStats: make(map[string]*system.FsStats),
|
||||
cache: NewSessionCache(69 * time.Second),
|
||||
}
|
||||
@@ -59,8 +60,6 @@ func NewAgent() *Agent {
|
||||
agent.sensorsContext = context.WithValue(agent.sensorsContext,
|
||||
common.EnvKey, common.EnvMap{common.HostSysEnvKey: sysSensors},
|
||||
)
|
||||
} else {
|
||||
agent.sensorsContext = context.Background()
|
||||
}
|
||||
|
||||
// Set sensors whitelist
|
||||
|
Reference in New Issue
Block a user