Merge pull request #32 from QuentinPerez/patch-1
Don't print buff if an error occurred
This commit is contained in:
commit
dcf603df90
|
@ -340,6 +340,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
|
||||
|
|
Loading…
Reference in New Issue