Skip to content

Commit

Permalink
simplify error type check
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Apr 17, 2024
1 parent 4844839 commit 60a3e4a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,6 @@ func (c *Conn) readAndBuffer(ctx context.Context) error {
hasHandshake = true
}

var e *alertError
if errors.As(err, &e) && e.IsFatalOrCloseNotify() {
return e
}
if err != nil {
return err
}
Expand Down Expand Up @@ -644,8 +640,7 @@ func (c *Conn) handleQueuedPackets(ctx context.Context) error {
var e *alertError
if errors.As(err, &e) && e.IsFatalOrCloseNotify() {
return e
}
if err != nil {
} else if err != nil {
return err
}
}
Expand Down

0 comments on commit 60a3e4a

Please sign in to comment.