diff --git a/_examples/websocket/connectionlist/main.go b/_examples/websocket/connectionlist/main.go index 14c399a8..f13bc02f 100644 --- a/_examples/websocket/connectionlist/main.go +++ b/_examples/websocket/connectionlist/main.go @@ -77,7 +77,7 @@ func main() { go func() { i := 0 - for { + for range time.Tick(1*time.Second){ //another way to get clock signal mutex.Lock() broadcast(Conn, fmt.Sprintf("aaaa2 %d\n", i)) mutex.Unlock()