aboutsummaryrefslogtreecommitdiff
path: root/console/console.go
diff options
context:
space:
mode:
Diffstat (limited to 'console/console.go')
-rw-r--r--console/console.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/console/console.go b/console/console.go
index 9884455..bbe366e 100644
--- a/console/console.go
+++ b/console/console.go
@@ -26,7 +26,10 @@ func (c *Console) read(r io.Reader) {
var v uint16
defer close(c.ich)
for {
- fmt.Fscanf(r, "%c", &v)
+ _, err := fmt.Fscanf(r, "%c", &v)
+ if err == io.EOF {
+ return
+ }
select {
case <-c.done:
return