Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Commit 0f22047

Browse files
committed
added timeout to chromedp process (testing for GH action)
1 parent 082c0f8 commit 0f22047

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extras.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ func (ex *extras) htmlToX(w http.ResponseWriter, r *http.Request) {
147147
)*/
148148

149149
// make sure it can timeout
150-
//cctx, _ := context.WithTimeout(context.Background(), 3*time.Second)
150+
cctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
151151

152152
//HACK:
153-
//ctx, cancel := chromedp.NewContext(cctx)
154-
ctx, cancel := chromedp.NewContext(context.Background())
153+
ctx, cancel := chromedp.NewContext(cctx)
154+
//ctx, cancel := chromedp.NewContext(context.Background())
155155
defer cancel()
156156

157157
var buf []byte

0 commit comments

Comments
 (0)