fix cancelablestdin

This commit is contained in:
chzyer 2016-09-01 20:01:12 +08:00
parent 6cbc078c57
commit 4ffff9f41c
1 changed files with 1 additions and 1 deletions

2
std.go
View File

@ -89,7 +89,7 @@ loop:
select { select {
case <-c.notify: case <-c.notify:
c.read, c.err = os.Stdin.Read(c.data) c.read, c.err = os.Stdin.Read(c.data)
<-c.notify c.notify <- struct{}{}
case <-c.stop: case <-c.stop:
break loop break loop
} }