@nestjs/microservices
Advanced tools
Comparing version 10.4.0 to 10.4.1
@@ -12,2 +12,3 @@ import { Logger } from '@nestjs/common/services/logger.service'; | ||
protected natsClient: Client; | ||
protected clientConnectionPromise: Promise<Client>; | ||
constructor(options: NatsOptions['options']); | ||
@@ -14,0 +15,0 @@ close(): Promise<void>; |
@@ -28,8 +28,10 @@ "use strict"; | ||
this.natsClient = null; | ||
this.clientConnectionPromise = null; | ||
} | ||
async connect() { | ||
if (this.natsClient) { | ||
return this.natsClient; | ||
if (this.clientConnectionPromise) { | ||
return this.clientConnectionPromise; | ||
} | ||
this.natsClient = await this.createClient(); | ||
this.clientConnectionPromise = this.createClient(); | ||
this.natsClient = await this.clientConnectionPromise; | ||
this.handleStatusUpdates(this.natsClient); | ||
@@ -36,0 +38,0 @@ return this.natsClient; |
{ | ||
"name": "@nestjs/microservices", | ||
"version": "10.4.0", | ||
"version": "10.4.1", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)", | ||
@@ -25,4 +25,4 @@ "author": "Kamil Mysliwiec", | ||
"devDependencies": { | ||
"@nestjs/common": "10.4.0", | ||
"@nestjs/core": "10.4.0" | ||
"@nestjs/common": "10.4.1", | ||
"@nestjs/core": "10.4.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
393920
9588
10