MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / refresh

Method refresh

lib/utils.js:605–624  ·  view source on GitHub ↗

* Tries to resolve the addresses for the host name.

()

Source from the content-addressed store, hash-verified

603 * Tries to resolve the addresses for the host name.
604 */
605 async refresh() {
606 if (this._isIp) {
607 return;
608 }
609
610 if (this._refreshing) {
611 return await promiseUtils.fromEvent(this._refreshing, 'finished');
612 }
613
614 this._refreshing = new EventEmitter().setMaxListeners(0);
615
616 try {
617 await this._resolve();
618 } catch (err) {
619 // Ignore the possible resolution error
620 }
621
622 this._refreshing.emit('finished');
623 this._refreshing = null;
624 }
625
626 async _resolve() {
627 const arr = await this._resolve4(this._nameOrIp);

Callers 2

utils-tests.jsFile · 0.80

Calls 1

_resolveMethod · 0.95

Tested by

no test coverage detected