Repository navigation
Commit e911eaa
committed
chore(reliability): recover() in fire-and-forget goroutines (closes #672)
Add deferred recover() to the three unprotected background goroutines
surfaced in the #669/#670 sibling audit:
- internal/auth/service_apikeys.go: UpdateLastUsed async goroutine
- internal/api/db_rate_limiter.go: cleanup async goroutine
- internal/api/handler_accounts.go: GCP ts.Token() goroutine; panic
now also sends an error back on tokenChan so the caller returns
promptly rather than blocking until the 15s deadline fires
Matches the existing pattern in ri_utilization_cache.go and scheduler.go.1 parent 1d9f1b8 commit e911eaa
3 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
884 | 890 | | |
885 | 891 | | |
886 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
| |||
0 commit comments