add guard for #18
This commit is contained in:
parent
56392dfed0
commit
f1986cba99
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user