Fix: Main loop blocked by double quit (#2674)

This commit is contained in:
valoq authored and GitHub committed 2026-09-07 19:50:31 +00:00
1 parent 1c9029e9ec
commit 274b13df9e
2 files changed
+10 -2

No files matched your search

+8
View File
@@ -95,6 +95,14 @@ func (app *app) quit() {
}
}
// requestQuit signals the main loop to quit and never blocks when a request is already pending.
func (app *app) requestQuit() {
select {
case app.quitChan <- struct{}{}:
default:
}
}
func (app *app) readFile(path string) {
log.Printf("reading file: %s", path)