From a798f7719d69c0c42c1e4537225a74de8ae7efa1 Mon Sep 17 00:00:00 2001 From: cornelk Date: Thu, 23 Sep 2021 16:18:01 -0600 Subject: [PATCH] fix panic in call retry gets called after a socket has been closed and the context set to nil --- errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors.go b/errors.go index 21a1900..6f70f8a 100644 --- a/errors.go +++ b/errors.go @@ -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)