Skip to content

Commit

Permalink
Merge pull request #178 from cornelk/fix_retry_panic
Browse files Browse the repository at this point in the history
fix panic in call retry gets called after a socket has been closed and the context set to nil
  • Loading branch information
pebbe authored Sep 24, 2021
2 parents 4714f83 + a798f77 commit 5806f25
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 5806f25

Please sign in to comment.