• Marcelo E. Magallon's avatar
    Simplify websocket ticker shutdown code · d4a14af1
    Marcelo E. Magallon authored
    "A receive from a closed channel returns the zero value immediately"
    
    Close the tickerChan in the calling function, this causes "case <-c" to
    unblock immediately, ending the goroutine and stopping the ticker.
    d4a14af1
websocket.go 6.66 KB