Exit goroutine when connection is not WebSocket

This commit is contained in:
Vojtěch Káně 2019-06-24 11:03:38 +02:00
parent 2a23cedc6d
commit 45fc4bf135

View File

@ -56,6 +56,7 @@ func main() {
con, err := upgrader.Upgrade(w, r, nil)
if err != nil {
log.Println(err)
return
}
var quit = make(chan bool)
con.SetCloseHandler(func(code int, text string) error {