From e6b0e2efa576052461836ec28a35bbd5e66f1bdf Mon Sep 17 00:00:00 2001 From: w1n2k Date: Thu, 12 Jan 2017 17:00:39 +0300 Subject: [PATCH 1/2] Fixed [Unexpected] EOF bug with websockets --- controller/live.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/live.go b/controller/live.go index 8c500905..465971dd 100644 --- a/controller/live.go +++ b/controller/live.go @@ -116,7 +116,7 @@ func (c *Controller) goLive(inerr error, conn net.Conn, rd *server.AnyReaderWrit for { v, err := rd.ReadMessage() if err != nil { - if err != io.EOF { + if err != io.EOF && (websocket && err != io.ErrUnexpectedEOF) { log.Error(err) } return From 4d446aeb7767058a350fe909bfe541bc9ce2da4f Mon Sep 17 00:00:00 2001 From: w1n2k Date: Fri, 13 Jan 2017 00:22:14 +0300 Subject: [PATCH 2/2] Fixed condition --- controller/live.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/live.go b/controller/live.go index 465971dd..0a53f44d 100644 --- a/controller/live.go +++ b/controller/live.go @@ -116,7 +116,7 @@ func (c *Controller) goLive(inerr error, conn net.Conn, rd *server.AnyReaderWrit for { v, err := rd.ReadMessage() if err != nil { - if err != io.EOF && (websocket && err != io.ErrUnexpectedEOF) { + if err != io.EOF && !(websocket && err == io.ErrUnexpectedEOF) { log.Error(err) } return