MCPcopy
hub / github.com/nestjs/nest / handleClose

Method handleClose

packages/microservices/client/client-tcp.ts:156–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154 }
155
156 public handleClose() {
157 this.socket = null;
158 this.connectionPromise = null;
159
160 if (this.routingMap.size > 0) {
161 const err = new Error('Connection closed');
162 for (const callback of this.routingMap.values()) {
163 callback({ err });
164 }
165 this.routingMap.clear();
166 }
167 }
168
169 public on<
170 EventKey extends keyof TcpEvents = keyof TcpEvents,

Callers 3

closeMethod · 0.95
registerCloseListenerMethod · 0.95
server-tcp.spec.tsFile · 0.45

Calls 2

callbackFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected