Skip to content

Commit

Permalink
Remove redundant connection check in send function.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wneessen committed Oct 24, 2024
1 parent 1519522 commit 45ebcb9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 45ebcb9

Please sign in to comment.