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.
This commit is contained in:
Winni Neessen 2024-10-24 12:02:57 +02:00
parent 1519522e5d
commit 45ebcb95b3
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -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
}