diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -109,6 +109,10 @@ func work(ctx context.Context, cli *http.Client, timeout time.Duration, question req, err := http.NewRequestWithContext(cctx, http.MethodGet, "https://"+question.Domain, nil) if err != nil { answer.ReqErr = err + if cctx.Err() != nil { + answer.CtxErr = true + } + answerCh <- answer return } @@ -116,6 +120,10 @@ func work(ctx context.Context, cli *http.Client, timeout time.Duration, question rsp, err := cli.Do(req) if err != nil { answer.DoErr = err + if cctx.Err() != nil { + answer.CtxErr = true + } + answerCh <- answer return } |