File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
packages/magnitude-core/src Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " magnitude-core " : patch
3+ ---
4+
5+ fix agent hang after stop by cleaning up webharness interval
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ export class BrowserConnector implements AgentConnector {
9898
9999 async onStop ( ) : Promise < void > {
100100 this . logger . info ( "Stopping..." ) ;
101+ if ( this . harness ) {
102+ await this . harness . stop ( ) ;
103+ this . logger . info ( "WebHarness cleaned up." ) ;
104+ }
101105 if ( this . context ) {
102106 await this . context . close ( ) ;
103107 this . logger . info ( "Browser context closed." ) ;
Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ export class WebHarness { // implements StateComponent
9595 await this . visualizer . setup ( ) ;
9696 }
9797
98+ async stop ( ) {
99+ // Clean up tab manager resources
100+ this . tabs . destroy ( ) ;
101+ }
102+
98103 get page ( ) {
99104 return this . tabs . getActivePage ( ) ;
100105 }
You can’t perform that action at this time.
0 commit comments