Skip to content

Commit

Permalink
Update aas-provider.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfaron committed Jun 23, 2024
1 parent d05f9ff commit 5dec594
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions projects/aas-server/src/app/aas-provider/aas-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export class AASProvider {
private readonly timeout: number;
private readonly file: string | undefined;
private wsServer!: WSServer;
private shutDown = false;
private resetRequested = false;

public constructor(
Expand Down Expand Up @@ -227,13 +226,10 @@ export class AASProvider {
}

this.resetRequested = true;
this.shutDown = true;

if (!this.taskHandler.empty(this)) {
return;
if (this.taskHandler.empty(this)) {
await this.doResetAsync();
}

await this.doResetAsync();
}

/**
Expand Down Expand Up @@ -414,7 +410,6 @@ export class AASProvider {

private startScan = async (): Promise<void> => {
try {
this.shutDown = false;
for (const endpoint of await this.index.getEndpoints()) {
setTimeout(this.scanContainer, 0, this.taskHandler.createTaskId(), endpoint);
}
Expand Down Expand Up @@ -450,9 +445,7 @@ export class AASProvider {

this.taskHandler.delete(result.taskId);
const endpoint = await this.index.getEndpoint(task.name);
if (endpoint && this.shutDown === false) {
setTimeout(this.scanContainer, this.timeout, result.taskId, endpoint);
}
setTimeout(this.scanContainer, this.timeout, result.taskId, endpoint);

if (result.messages) {
this.logger.start(`scan ${task.name ?? 'undefined'}`);
Expand Down

0 comments on commit 5dec594

Please sign in to comment.