diff --git a/gorilla.go b/gorilla.go index 469fa97..0f2a9a8 100644 --- a/gorilla.go +++ b/gorilla.go @@ -77,7 +77,7 @@ func gorillaDial() { // handle inbound messages on the channel go readGorillaConn(done, conn) - ticker := time.NewTicker(time.Second) + ticker := time.NewTicker(time.Second * 10) defer ticker.Stop() for { @@ -85,20 +85,7 @@ func gorillaDial() { case <-done: return case t := <-ticker.C: - err := conn.WriteMessage(websocket.TextMessage, []byte(t.String())) - if err != nil { - log.Println("write:", err) - return - } - - msg := pb.CreateSampleEvent() - msg.Name = "test echo over gorilla websocket" - data, _ := proto.Marshal(msg) - err2 := conn.WriteMessage(websocket.BinaryMessage, data) - if err2 != nil { - log.Println("write:", err2) - return - } + log.Println("gorilla NewTicker()", t.String()) case <-interrupt: log.Println("interrupt") diff --git a/main.go b/main.go index 2872a89..2ad1526 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,7 @@ func main() { go processEvents() // setups up a dnssecsocket() - // go retrySocket() + go retrySocket() time.Sleep(3 * 1000 * 1000 * 1000) go gorillaDial()