/** * Destroys this reference target, closing all connections and freeing all resources. * The target actor is not destroyed. * * @returns {Promise} Operation promise. */ destroy() { return P.fromCallback(cb => this.server.close(cb)); }
destroy0() { let actorPromise = this.actorPromise || P.resolve(); return actorPromise .then(actor => actor && actor.destroy()) .then(() => { this.socket && this.socket.end(); this.server && this.server.close(); }); }
.then(() => { if (this.server) { this.server.close();
serverP = P.fromCallback(cb => server.close(cb));
/** * Destroys this reference target, closing all connections and freeing all resources. * The target actor is not destroyed. * * @returns {Promise} Operation promise. */ destroy() { return P.fromCallback(cb => this.server.close(cb)); }