@ -386,7 +386,7 @@ func NewLocalBackend(logf logger.Logf, logID logid.PublicID, sys *tsd.System, lo
b . logf ( "[unexpected] failed to wire up PeerAPI port for engine %T" , e )
b . logf ( "[unexpected] failed to wire up PeerAPI port for engine %T" , e )
}
}
for _ , component := range d ebuggableComponents {
for _ , component := range ipn. D ebuggableComponents {
key := componentStateKey ( component )
key := componentStateKey ( component )
if ut , err := ipn . ReadStoreInt ( pm . Store ( ) , key ) ; err == nil {
if ut , err := ipn . ReadStoreInt ( pm . Store ( ) , key ) ; err == nil {
if until := time . Unix ( ut , 0 ) ; until . After ( b . clock . Now ( ) ) {
if until := time . Unix ( ut , 0 ) ; until . After ( b . clock . Now ( ) ) {
@ -404,11 +404,6 @@ type componentLogState struct {
timer tstime . TimerController // if non-nil, the AfterFunc to disable it
timer tstime . TimerController // if non-nil, the AfterFunc to disable it
}
}
var debuggableComponents = [ ] string {
"magicsock" ,
"sockstats" ,
}
func componentStateKey ( component string ) ipn . StateKey {
func componentStateKey ( component string ) ipn . StateKey {
return ipn . StateKey ( "_debug_" + component + "_until" )
return ipn . StateKey ( "_debug_" + component + "_until" )
}
}
@ -440,7 +435,7 @@ func (b *LocalBackend) SetComponentDebugLogging(component string, until time.Tim
}
}
}
}
}
}
if setEnabled == nil || ! slices . Contains ( d ebuggableComponents, component ) {
if setEnabled == nil || ! slices . Contains ( ipn. D ebuggableComponents, component ) {
return fmt . Errorf ( "unknown component %q" , component )
return fmt . Errorf ( "unknown component %q" , component )
}
}
timeUnixOrZero := func ( t time . Time ) int64 {
timeUnixOrZero := func ( t time . Time ) int64 {