MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / persistAuthAsync

Method persistAuthAsync

internal/watcher/clients.go:420–440  ·  view source on GitHub ↗
(message string, paths ...string)

Source from the content-addressed store, hash-verified

418}
419
420func (w *Watcher) persistAuthAsync(message string, paths ...string) {
421 if w == nil || w.storePersister == nil {
422 return
423 }
424 filtered := make([]string, 0, len(paths))
425 for _, p := range paths {
426 if trimmed := strings.TrimSpace(p); trimmed != "" {
427 filtered = append(filtered, trimmed)
428 }
429 }
430 if len(filtered) == 0 {
431 return
432 }
433 go func() {
434 ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
435 defer cancel()
436 if err := w.storePersister.PersistAuthFiles(ctx, message, filtered...); err != nil {
437 log.Errorf("failed to persist auth changes: %v", err)
438 }
439 }()
440}
441
442func (w *Watcher) stopServerUpdateTimer() {
443 w.serverUpdateMu.Lock()

Calls 1

PersistAuthFilesMethod · 0.65