diff --git a/std.go b/std.go index 736fe5d..0e184cc 100644 --- a/std.go +++ b/std.go @@ -93,7 +93,11 @@ loop: select { case <-c.notify: c.read, c.err = c.r.Read(c.data) - c.notify <- struct{}{} + select { + case c.notify <- struct{}{}: + case <-c.stop: + break loop + } case <-c.stop: break loop }