sdfsdf
This commit is contained in:
@@ -23,7 +23,7 @@ class SeleniumBrowser {
|
|||||||
.then(body => body.getAttribute('innerHTML'))
|
.then(body => body.getAttribute('innerHTML'))
|
||||||
let htmlPromise = this.isCaptchaPage(html) ? this.resolveCaptcha(driver) : this.getHtml(driver, html, params)
|
let htmlPromise = this.isCaptchaPage(html) ? this.resolveCaptcha(driver) : this.getHtml(driver, html, params)
|
||||||
html = await htmlPromise
|
html = await htmlPromise
|
||||||
this.pool.release(driver)
|
this.pool.destroy(driver)
|
||||||
return html
|
return html
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -40,9 +40,10 @@ class PoolingService {
|
|||||||
return driver.getSession().then(s => {
|
return driver.getSession().then(s => {
|
||||||
logger.info('Driver session validation checked (id: %s)', s.getId())
|
logger.info('Driver session validation checked (id: %s)', s.getId())
|
||||||
return true
|
return true
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
this.pool.destroy(driver)
|
||||||
logger.debug({ message: err.message }, 'Driver session expired and destroy it')
|
logger.debug({ message: err.message }, 'Driver session expired and destroy it')
|
||||||
return this.pool.destroy(driver).then(() => false)
|
return false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user