Skip to content

Commit 7307f62

Browse files
committed
Fix return of nil alertErrors
Fixes two cases where nil alert errors were being returned rather than the underlying error. Calling methods on these nil alert errors can lead to panics. Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
1 parent b905606 commit 7307f62

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ func (c *Conn) readAndBuffer(ctx context.Context) error {
615615
return e
616616
}
617617
} else if err != nil {
618-
return e
618+
return err
619619
}
620620
}
621621
if hasHandshake {
@@ -650,7 +650,7 @@ func (c *Conn) handleQueuedPackets(ctx context.Context) error {
650650
return e
651651
}
652652
} else if err != nil {
653-
return e
653+
return err
654654
}
655655
}
656656
return nil

0 commit comments

Comments
 (0)