From 58b5647a4a62e8df6f34fd72593d6479b2b44b94 Mon Sep 17 00:00:00 2001 From: zhangkai Date: Sun, 13 Oct 2024 15:15:56 +0800 Subject: [PATCH] lint code --- ethtxmanager/server_xlayer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ethtxmanager/server_xlayer.go b/ethtxmanager/server_xlayer.go index 0cfeca7de3..ee0e05d66f 100644 --- a/ethtxmanager/server_xlayer.go +++ b/ethtxmanager/server_xlayer.go @@ -59,10 +59,7 @@ func (c *Client) startRPC() { return } log.Errorf("closed http connection: %v", err) - return } - - return } func (c *Client) stopRPC() { @@ -112,5 +109,8 @@ func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request) { var resp Response resp.Data = data respBytes, _ := json.Marshal(resp) - w.Write(respBytes) + _, err := w.Write(respBytes) + if err != nil { + log.Errorf("failed to write response: %v", err) + } }