From 061d51a604c546b48e92253cb65190d76cecf4c6 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 24 Nov 2017 15:55:02 -0800 Subject: [PATCH] fixes #169 data race between inputLoop and mainLoop --- tscreen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tscreen.go b/tscreen.go index 4c16d41..7e0d0b9 100644 --- a/tscreen.go +++ b/tscreen.go @@ -1298,8 +1298,8 @@ func (t *tScreen) mainLoop() { func (t *tScreen) inputLoop() { - chunk := make([]byte, 128) for { + chunk := make([]byte, 128) n, e := t.in.Read(chunk) switch e { case io.EOF: