mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-05-25 01:04:12 +02:00
@@ -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