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)
|
||||
if c, ok := p.conns[port]; ok && c != nil {
|
||||
// CdpDisconnect = cerrar el WebSocket sin matar Chrome (el navegador
|
||||
// sigue vivo; solo soltamos la sesión pooled).
|
||||
_ = browser.CdpDisconnect(c)
|
||||
// pid=0: cerrar solo el WebSocket, sin matar Chrome (el navegador sigue
|
||||
// vivo; solo soltamos la sesión pooled).
|
||||
_ = browser.CdpClose(c, 0)
|
||||
delete(p.conns, port)
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ func (p *connPool) closeAll() {
|
||||
cancel()
|
||||
}
|
||||
if c != nil {
|
||||
_ = browser.CdpDisconnect(c)
|
||||
_ = browser.CdpClose(c, 0)
|
||||
}
|
||||
}
|
||||
p.conns = map[int]*browser.CDPConn{}
|
||||
|
||||
Reference in New Issue
Block a user