From 17b536725b647105011ace8425528665740e726b Mon Sep 17 00:00:00 2001 From: chzyer <0@0xdf.com> Date: Thu, 6 Oct 2016 12:31:47 +0800 Subject: [PATCH] fix notify back --- std.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }