treat websocket write error as fatal

This commit is contained in:
Morgan McMillian 2021-08-13 21:31:26 -07:00
parent ed8d5695d0
commit 2f15ad4244

View file

@ -317,8 +317,7 @@ func main() {
case <-time.After(time.Duration(1) * time.Millisecond * 1000): case <-time.After(time.Duration(1) * time.Millisecond * 1000):
err := conn.WriteMessage(websocket.TextMessage, []byte(".")) err := conn.WriteMessage(websocket.TextMessage, []byte("."))
if err != nil { if err != nil {
log.Println("!! error during write to websocket:", err) log.Fatal("!! error during write to websocket:", err)
return
} }
url := conf.MbUrl + "/api/messages" url := conf.MbUrl + "/api/messages"