merge: fix drift cdp_close en pool (quick/fix-close-drift)
This commit is contained in:
@@ -48,9 +48,9 @@ func (p *connPool) drop(port int) {
|
|||||||
}
|
}
|
||||||
delete(p.dialogLogs, port)
|
delete(p.dialogLogs, port)
|
||||||
if c, ok := p.conns[port]; ok && c != nil {
|
if c, ok := p.conns[port]; ok && c != nil {
|
||||||
// CdpDisconnect = cerrar el WebSocket sin matar Chrome (el navegador
|
// pid=0: cerrar solo el WebSocket, sin matar Chrome (el navegador sigue
|
||||||
// sigue vivo; solo soltamos la sesión pooled).
|
// vivo; solo soltamos la sesión pooled).
|
||||||
_ = browser.CdpDisconnect(c)
|
_ = browser.CdpClose(c, 0)
|
||||||
delete(p.conns, port)
|
delete(p.conns, port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ func (p *connPool) closeAll() {
|
|||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
if c != nil {
|
if c != nil {
|
||||||
_ = browser.CdpDisconnect(c)
|
_ = browser.CdpClose(c, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.conns = map[int]*browser.CDPConn{}
|
p.conns = map[int]*browser.CDPConn{}
|
||||||
|
|||||||
Reference in New Issue
Block a user