fix(surf): close the rate-limit store a router created (quick-261118-lbt)

- MemoryStore.Close stops the sweep goroutine; Attempt keeps working
- Router.Close runs what the router owns (the fallback MemoryStore of
  BuildRouter), never a store published on the app
- BuildRouter closes the router on every error return
- serve closes its router and installCooler's fallback store on exit;
  route:list closes its router
- README and rate-limiting docs describe the ownership
This commit is contained in:
Jakub Zych
2026-11-18 15:41:05 +01:00
parent ea1befdd6c
commit d9e21ad019
8 changed files with 281 additions and 48 deletions

View File

@@ -45,6 +45,7 @@ scripts.`,
if err != nil {
return err
}
defer r.Close()
infos := r.Routes()
if in != nil {
if bonfire.FlagBool(in, jsonFlagName) {