Skip to content

Commit

Permalink
fix panic in call retry gets called after a socket has been closed an…
Browse files Browse the repository at this point in the history
…d the context set to nil
  • Loading branch information
cornelk committed Sep 23, 2021
1 parent 4714f83 commit a798f77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func AsErrno(err error) Errno {
}

func (ctx *Context) retry(err error) bool {
if !ctx.retryEINTR || err == nil {
if ctx == nil || !ctx.retryEINTR || err == nil {
return false
}
eno, ok := err.(syscall.Errno)
Expand Down

0 comments on commit a798f77

Please sign in to comment.