Skip to content

Commit 45ebcb9

Browse files
author
Winni Neessen
committed
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.
1 parent 1519522 commit 45ebcb9

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

client.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,12 +1276,6 @@ func (c *Client) sendSingleMsg(message *Msg) error {
12761276
affectedMsg: message,
12771277
}
12781278
}
1279-
if err = c.checkConn(); err != nil {
1280-
return &SendError{
1281-
Reason: ErrConnCheck, errlist: []error{err}, isTemp: isTempError(err),
1282-
affectedMsg: message,
1283-
}
1284-
}
12851279
return nil
12861280
}
12871281

0 commit comments

Comments
 (0)