MCPcopy
hub / github.com/redis/node-redis / stop

Method stop

packages/test-utils/lib/proxy/redis-proxy.ts:128–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 }
127
128 public async stop(): Promise<void> {
129 return new Promise((resolve) => {
130 if (!this.isRunning) {
131 resolve();
132 return;
133 }
134
135 Array.from(this.connections.keys()).forEach((connectionId) => {
136 this.closeConnection(connectionId);
137 });
138
139 this.server.close(() => {
140 this.isRunning = false;
141 this.log('Proxy server stopped');
142 this.emit('close');
143 resolve();
144 });
145 });
146 }
147
148 private makeInterceptor(description: InterceptorDescription): Interceptor {
149 const { name, fn, matchLimit } = description;

Callers 2

testWithProxiedClientMethod · 0.95

Calls 4

closeConnectionMethod · 0.95
logMethod · 0.95
keysMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected