Skip to content

Commit 5806f25

Browse files
authored
Merge pull request #178 from cornelk/fix_retry_panic
fix panic in call retry gets called after a socket has been closed and the context set to nil
2 parents 4714f83 + a798f77 commit 5806f25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func AsErrno(err error) Errno {
9292
}
9393

9494
func (ctx *Context) retry(err error) bool {
95-
if !ctx.retryEINTR || err == nil {
95+
if ctx == nil || !ctx.retryEINTR || err == nil {
9696
return false
9797
}
9898
eno, ok := err.(syscall.Errno)

0 commit comments

Comments
 (0)