From f6d1fcac256756a3ccad64ccd983e0615f1ea5c0 Mon Sep 17 00:00:00 2001 From: Quentin Perez Date: Thu, 19 Nov 2015 00:23:01 +0100 Subject: [PATCH] Don't print buff if an error occurred --- gotty-client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gotty-client.go b/gotty-client.go index ac67834..f83c8ce 100644 --- a/gotty-client.go +++ b/gotty-client.go @@ -350,6 +350,7 @@ func (c *Client) readLoop(done chan bool, wg *sync.WaitGroup) { buf, err := base64.StdEncoding.DecodeString(string(msg.Data[1:])) if err != nil { logrus.Warnf("Invalid base64 content: %q", msg.Data[1:]) + break } fmt.Fprintf(c.Output, string(buf)) case '1': // pong