destroy session for all error
This commit is contained in:
@@ -21,10 +21,8 @@ class SeleniumBrowser {
|
||||
.then(() => driver.findElement(By.css('body')))
|
||||
.then(body => body.getAttribute('innerHTML'))
|
||||
.catch(e => {
|
||||
if (e instanceof NoSuchSessionError) {
|
||||
this.pool.destroy(driver)
|
||||
throw new NoSuchSessionError
|
||||
}
|
||||
this.pool.destroy(driver)
|
||||
throw new Error(e.message)
|
||||
})
|
||||
let p = captcha.isCaptchaPage(html) ? captcha.resolveCaptcha(driver, this.pool) : this.getHtml(driver, html, params)
|
||||
html = await p
|
||||
|
||||
Reference in New Issue
Block a user