add guard for #18

This commit is contained in:
NatureFreshMilk 2019-03-22 08:18:09 +01:00
parent 56392dfed0
commit f1986cba99

View File

@ -69,6 +69,13 @@ func (t *WS) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
for {
data := <-ch
if data == nil {
//how the hell got a nil reference in here..?!
//related issue: #18
continue
}
err := conn.WriteMessage(websocket.TextMessage, data)
if err != nil {
break