more debugging

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-21 18:18:59 -07:00
parent 6868e87c5c
commit 7e787c10ca
2 changed files with 6 additions and 2 deletions

View File

@ -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")
}
}

View File

@ -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) {