Skip to content

Commit

Permalink
fix: xd
Browse files Browse the repository at this point in the history
  • Loading branch information
socram03 committed Aug 25, 2024
1 parent 32afdc0 commit 090a568
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/client/workerclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
promises = new Map<string, { resolve: (value: any) => void; timeout: NodeJS.Timeout }>();

shards = new Map<number, Shard>();
workerData: WorkerData;
private __setServicesCache?: boolean;

declare options: WorkerClientOptions;
Expand All @@ -65,7 +64,6 @@ export class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
if (options?.postMessage) {
this.postMessage = options.postMessage;
}
this.workerData = workerData;
}

get workerId() {
Expand Down Expand Up @@ -103,10 +101,13 @@ export class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
}

setWorkerData(data: WorkerData) {
this.workerData = data;
workerData = data;
}

get workerData() {
return workerData;
}

async start(options: Omit<DeepPartial<StartOptions>, 'httpConnection' | 'token' | 'connection'> = {}) {
const worker_threads = lazyLoadPackage<typeof import('node:worker_threads')>('node:worker_threads');

Expand Down

0 comments on commit 090a568

Please sign in to comment.