MCPcopy
hub / github.com/loopbackio/loopback-next / stop

Method stop

packages/http-server/src/http-server.ts:185–197  ·  view source on GitHub ↗

* Stops the HTTP / HTTPS server

()

Source from the content-addressed store, hash-verified

183 * Stops the HTTP / HTTPS server
184 */
185 public async stop() {
186 if (!this._listening) return;
187 debug('Stopping http server');
188 if (this._stoppable != null) {
189 debug('Stopping http server with graceful close');
190 this._stoppable.stop();
191 } else {
192 this.server.close();
193 }
194 await once(this.server, 'close');
195 this._listening = false;
196 debug('Http server is stopped');
197 }
198
199 /**
200 * Protocol of the HTTP / HTTPS server

Callers

nothing calls this directly

Calls 3

onceFunction · 0.85
stopMethod · 0.65
closeMethod · 0.45

Tested by

no test coverage detected