fix(core): update
This commit is contained in:
		@@ -6,14 +6,17 @@ export class AgTestServer {
 | 
			
		||||
 | 
			
		||||
  constructor(handlerArg?: plugins.agSdk.AAgHandler<any>) {
 | 
			
		||||
    if (handlerArg) {
 | 
			
		||||
      this.handlers.push(handlerArg);
 | 
			
		||||
      this.addAgHandler(handlerArg);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
 | 
			
		||||
    this.handlers.push(handlerArg);
 | 
			
		||||
    await this.stop();
 | 
			
		||||
    await this.start();
 | 
			
		||||
    console.log(`added handler with slug ${handlerArg.slug}`);
 | 
			
		||||
    if (this.server && this.server.serverStatus === 'running') {
 | 
			
		||||
      await this.stop();
 | 
			
		||||
      await this.start();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public async start() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user