enhancement: archive.Archive() uses hardcoded time.Sleep that ignores context #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #1
Description
In
sites/archive/archive.go:122:This blocks for 5 seconds unconditionally and doesn't respect context cancellation. If the context is cancelled during this sleep, the function won't notice until after the sleep completes.
Fix
Replace with a context-aware sleep:
Starting work on this as part of PR 6 (also includes #7). Will replace
time.Sleep(5s)with a context-aware select inarchive.go:132.Work finished. PR: #37 (merged)
Replaced
time.Sleep(5s)with context-awareselectusingtime.After.Resolved by PR #37 — replaced
time.Sleep(5s)with context-awareselectontime.Afterandctx.Done().