From 45ebcb95b3b81075c91277ca44a6b8dec482f910 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 24 Oct 2024 12:02:57 +0200 Subject: [PATCH] Remove redundant connection check in send function. The connection check is performed in the c.Reset call just before the c.checkconn call, making this redundant. Removing it simplifies the code and eliminates unnecessary error handling for connection status. This change helps improve code maintainability. --- client.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client.go b/client.go index 3e26e9f..50d2f28 100644 --- a/client.go +++ b/client.go @@ -1276,12 +1276,6 @@ func (c *Client) sendSingleMsg(message *Msg) error { affectedMsg: message, } } - if err = c.checkConn(); err != nil { - return &SendError{ - Reason: ErrConnCheck, errlist: []error{err}, isTemp: isTempError(err), - affectedMsg: message, - } - } return nil }