Skip to content

Commit

Permalink
fix: remove timeout
Browse files Browse the repository at this point in the history
it depends from browserless
closes #13
  • Loading branch information
Kikobeats committed Jan 25, 2019
1 parent 5c4b054 commit a02046f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@
"request"
],
"dependencies": {
"@metascraper/helpers": "~4.9.0",
"@metascraper/helpers": "~4.10.1",
"debug": "~4.1.1",
"got": "~9.6.0",
"he": "~1.2.0",
"html-encode": "~2.1.1",
"mem": "~4.0.0",
"p-cancelable": "~1.0.0",
"p-timeout": "~2.0.1",
"parse-domain": "~2.1.7",
"reachable-url": "~1.1.8",
"require-one-of": "~1.0.3",
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const PCancelable = require('p-cancelable')
const debug = require('debug')('html-get')
const htmlEncode = require('html-encode')
const timeSpan = require('time-span')
const pTimeout = require('p-timeout')
const { URL } = require('url')
const path = require('path')
const got = require('got')
Expand Down Expand Up @@ -86,7 +85,7 @@ const prerender = async (
try {
fetchReq = fetch(url, { reflect: true, toEncode, ...gotOptions })
const browserless = await getBrowserless()
html = await pTimeout(browserless.html(url, opts), REQ_TIMEOUT)
html = await browserless.html(url, { timeout: REQ_TIMEOUT, ...opts })
await fetchReq.cancel()
debug('prerender:success')
return { url, html: getHtml(html), mode: 'prerender' }
Expand Down

0 comments on commit a02046f

Please sign in to comment.