Add ticker for real
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-09-08 20:12:55 +02:00
parent 58b7027259
commit c116139f89
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -23,9 +23,10 @@ func newConsumer(conn net.Conn) *Consumer {
fmt.Fprint(conn, "\r\n")
go func() {
ticker := time.Tick(10 * time.Second)
for {
select {
case <-time.Tick(10 * time.Second):
case <-ticker:
fmt.Fprint(conn, `event: ping`)
fmt.Fprint(conn, "\r\n")
fmt.Fprint(conn, "\r\n")