From 7e787c10caf893d65f07c30de96a782f258a0af0 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 21 May 2019 18:18:59 -0700 Subject: [PATCH] more debugging Signed-off-by: Jeff Carr --- eventChannel.go | 3 ++- gorilla.go | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eventChannel.go b/eventChannel.go index 5dbdc6f..80ca5a9 100644 --- a/eventChannel.go +++ b/eventChannel.go @@ -27,7 +27,7 @@ func initChannel() { func processEvents() { for { message := <-mychannel - log.Println("processEvents() on channel recieved a message = ", message) + log.Println("processEvents() START on channel recieved a message = ", message) if (message.Type == pb.Event_DEMO) { log.Println("processEvents() do Event DEMO") // figure out how to interact with the GUI here @@ -37,6 +37,7 @@ func processEvents() { mh := addVmsTab(count) ReadReceivedData(message, mh) } + log.Println("processEvents() END on channel") } } diff --git a/gorilla.go b/gorilla.go index 1c4d85f..bf16186 100644 --- a/gorilla.go +++ b/gorilla.go @@ -20,6 +20,7 @@ var gorillaConn *websocket.Conn func readGorillaConn(conn *websocket.Conn) { for { + log.Println("gorilla START readGorillaConn()", time.Now()) mytype, message, err := conn.ReadMessage() if err != nil { log.Println("read:", err) @@ -38,7 +39,7 @@ func readGorillaConn(conn *websocket.Conn) { // log.Printf("type, err = ", mytype, err) } time.Sleep(time.Second) - log.Println("gorilla readGorillaConn()", time.Now()) + log.Println("gorilla END readGorillaConn()", time.Now()) } } @@ -57,6 +58,7 @@ func gorillaSendProtobuf() { gorillaConn = nil return } + log.Println("gorillaSendProtobuf() END OK", time.Now()) } func closeGorillaConn() { @@ -76,6 +78,7 @@ func closeGorillaConn() { // this must be called or set to be called with defer gorillaConn.Close() gorillaConn = nil + log.Println("closeGorillaConn() END OK", time.Now()) } func gorillaDial(hostname string) {