diff options
author | Mateusz Czapliński <czapkofan@gmail.com> | 2018-10-21 01:11:26 +0200 |
---|---|---|
committer | Mateusz Czapliński <czapkofan@gmail.com> | 2018-10-21 01:11:26 +0200 |
commit | 27ad66c827203e46113b5eb9597f923992273d12 (patch) | |
tree | fef47d7ee7928dc69bbf6393b1abd5ca235d93ea | |
parent | 38fd19f32434b82efeac3c3e6203edc13ba6eac9 (diff) |
fix behavior of Ctrl-S & Ctrl-Q
-rw-r--r-- | up.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -540,7 +540,7 @@ func (b *Buf) NewReader(blocking bool) io.Reader { return funcReader(func(p []byte) (n int, err error) { b.mu.Lock() end := b.n - for blocking && end == i && b.status != bufEOF && end < len(b.bytes) { + for blocking && end == i && b.status == bufReading && end < len(b.bytes) { // TODO: don't return EOF if input is fully buffered? difficult choice :/ // FIXME: somehow let GC collect this goroutine if its caller is killed & GCed // TODO: track leaking of these goroutines, see rsc's last hint in https://golang.org/issue/24696 |