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() { func processEvents() {
for { for {
message := <-mychannel 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) { if (message.Type == pb.Event_DEMO) {
log.Println("processEvents() do Event DEMO") log.Println("processEvents() do Event DEMO")
// figure out how to interact with the GUI here // figure out how to interact with the GUI here
@ -37,6 +37,7 @@ func processEvents() {
mh := addVmsTab(count) mh := addVmsTab(count)
ReadReceivedData(message, mh) ReadReceivedData(message, mh)
} }
log.Println("processEvents() END on channel")
} }
} }

View File

@ -20,6 +20,7 @@ var gorillaConn *websocket.Conn
func readGorillaConn(conn *websocket.Conn) { func readGorillaConn(conn *websocket.Conn) {
for { for {
log.Println("gorilla START readGorillaConn()", time.Now())
mytype, message, err := conn.ReadMessage() mytype, message, err := conn.ReadMessage()
if err != nil { if err != nil {
log.Println("read:", err) log.Println("read:", err)
@ -38,7 +39,7 @@ func readGorillaConn(conn *websocket.Conn) {
// log.Printf("type, err = ", mytype, err) // log.Printf("type, err = ", mytype, err)
} }
time.Sleep(time.Second) 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 gorillaConn = nil
return return
} }
log.Println("gorillaSendProtobuf() END OK", time.Now())
} }
func closeGorillaConn() { func closeGorillaConn() {
@ -76,6 +78,7 @@ func closeGorillaConn() {
// this must be called or set to be called with defer // this must be called or set to be called with defer
gorillaConn.Close() gorillaConn.Close()
gorillaConn = nil gorillaConn = nil
log.Println("closeGorillaConn() END OK", time.Now())
} }
func gorillaDial(hostname string) { func gorillaDial(hostname string) {