mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-05-22 07:57:00 +02:00
Merge branch 'feat-remote-browser' into test-build
This commit is contained in:
@@ -574,6 +574,13 @@ func (r *Runner) Run(ctx context.Context) error {
|
||||
emitter.errorf(fmt.Sprintf("browser launch failed: %v", err))
|
||||
return goja.Undefined()
|
||||
}
|
||||
// Kill and clean up Chrome when the session ends. Without this, stopping
|
||||
// a run before s.close() is called leaves a zombie Chrome process (~200-300 MB).
|
||||
go func() {
|
||||
<-outerCtx.Done()
|
||||
l.Kill()
|
||||
l.Cleanup()
|
||||
}()
|
||||
browser = rod.New().ControlURL(u).Context(outerCtx)
|
||||
if err := browser.Connect(); err != nil {
|
||||
emitter.errorf(fmt.Sprintf("browser connect failed: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user