From 70642637225459bafd25c26b6d52f3bb61172689 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Sat, 16 Mar 2024 16:56:15 -0500 Subject: [PATCH] Make error messages a bit more detailed --- pkg/websocketclient/websocketclient.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/websocketclient/websocketclient.go b/pkg/websocketclient/websocketclient.go index 066f973..a241a94 100644 --- a/pkg/websocketclient/websocketclient.go +++ b/pkg/websocketclient/websocketclient.go @@ -397,11 +397,12 @@ func (c *WebsocketClient) listen() { for { _, message, err := c.conn.ReadMessage() if err != nil { - log.Println(err.Error()) + log.Printf("Error reading message on chia websocket: %s\n", err.Error()) if _, isCloseErr := err.(*websocket.CloseError); !isCloseErr { + log.Println("Chia websocket sent close message, attempting to close connection...") closeConnErr := c.conn.Close() if closeConnErr != nil { - log.Printf("Error closing connection after error: %s\n", closeConnErr.Error()) + log.Printf("Error closing chia websocket connection: %s\n", closeConnErr.Error()) } } c.conn = nil