Skip to content

Commit 771e1d1

Browse files
committed
fix(microservices): lint issue
1 parent 68f1c1c commit 771e1d1

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

packages/microservices/server/server-rmq.ts

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,28 @@ export class ServerRMQ extends Server<RmqEvents, RmqStatus> {
135135
this.pendingEventListeners = [];
136136

137137
const connectFailedEvent = 'connectFailed';
138-
this.server!.once(connectFailedEvent, async (error: Record<string, unknown>) => {
139-
this._status$.next(RmqStatus.DISCONNECTED);
140-
141-
this.logger.error(CONNECTION_FAILED_MESSAGE);
142-
if (error?.err) {
143-
this.logger.error(error.err);
144-
}
145-
const isReconnecting = !!this.channel;
146-
if (
147-
maxConnectionAttempts === INFINITE_CONNECTION_ATTEMPTS ||
148-
isReconnecting
149-
) {
150-
return;
151-
}
152-
if (++this.connectionAttempts === maxConnectionAttempts) {
153-
await this.close();
154-
callback?.(error.err ?? new Error(CONNECTION_FAILED_MESSAGE));
155-
}
156-
});
138+
this.server!.once(
139+
connectFailedEvent,
140+
async (error: Record<string, unknown>) => {
141+
this._status$.next(RmqStatus.DISCONNECTED);
142+
143+
this.logger.error(CONNECTION_FAILED_MESSAGE);
144+
if (error?.err) {
145+
this.logger.error(error.err);
146+
}
147+
const isReconnecting = !!this.channel;
148+
if (
149+
maxConnectionAttempts === INFINITE_CONNECTION_ATTEMPTS ||
150+
isReconnecting
151+
) {
152+
return;
153+
}
154+
if (++this.connectionAttempts === maxConnectionAttempts) {
155+
await this.close();
156+
callback?.(error.err ?? new Error(CONNECTION_FAILED_MESSAGE));
157+
}
158+
},
159+
);
157160
}
158161

159162
public createClient<T = any>(): T {

0 commit comments

Comments
 (0)