From 2a7f279cd53bccc97883b4b9b97faec424943656 Mon Sep 17 00:00:00 2001 From: matst80 Date: Wed, 13 Nov 2024 22:18:40 +0100 Subject: [PATCH] wait for handle message --- tcp-connection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcp-connection.go b/tcp-connection.go index 0a9f501..6b64c2e 100644 --- a/tcp-connection.go +++ b/tcp-connection.go @@ -128,6 +128,7 @@ func WaitForFrame(conn net.Conn, resultChan chan<- FrameWithPayload) error { } return err } + log.Println("Checksum mismatch") return fmt.Errorf("checksum mismatch") } @@ -165,7 +166,7 @@ func (l *GenericListener) HandleConnection(conn net.Conn) { go WaitForFrame(conn, ch) select { case frame := <-ch: - go l.HandleFrame(conn, &frame) + l.HandleFrame(conn, &frame) case <-time.After(MaxCallDuration): close(ch) log.Printf("Timeout waiting for frame\n")