From 85379b12ca457e078722b340790d6e5f6e79c611 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Mon, 26 Oct 2015 14:04:16 -0400 Subject: [PATCH] Avoid CPU hotloop on client-closed websocket --- pkg/util/wsstream/conn.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/util/wsstream/conn.go b/pkg/util/wsstream/conn.go index 0c1033cd859..719cf191a67 100644 --- a/pkg/util/wsstream/conn.go +++ b/pkg/util/wsstream/conn.go @@ -97,9 +97,7 @@ func ignoreReceives(ws *websocket.Conn, timeout time.Duration) { for { resetTimeout(ws, timeout) if err := websocket.Message.Receive(ws, &data); err != nil { - if err == io.EOF { - return - } + return } } }