async pollRegistry() {
        this.delay = new Delay();
        await this.delay.wait(this.ttl / 2);


        // don't update after the service was de-registered
        if (this.isDeregistered) return;


        // call the registry and let them know that we're alive
        const response = await this.httpClient.patch(`${this.baseURL}/${this.identifier}`)
            .expect(200)
            .send();

        // consume the data, else the http2 stream will stay open
        await response.getData();

        // run again. important: without the setImmediate call the process may 
        // leak memory
        setImmediate(() => {
            this.pollRegistry().catch((err) => {
                log.error(`The service registry client for ${this.identifier} of type ${this.serviceName} has encountered an error: ${err.message}`, err);
            });
        });
    }
/**
     * call the registry in double the required frequency
     *
     * @return     {Promise}  undefined
     */
call the registry in double the required frequency
@return     {Promise}  undefined
call the registry in double the required frequency @return { Promise } undefined
async pollRegistry() {
        this.delay = new Delay();
        await this.delay.wait(this.ttl / 2);
        if (this.isDeregistered) return;
        const response = await this.httpClient.patch(`${this.baseURL}/${this.identifier}`)
            .expect(200)
            .send();
        await response.getData();
        setImmediate(() => {
            this.pollRegistry().catch((err) => {
                log.error(`The service registry client for ${this.identifier} of type ${this.serviceName} has encountered an error: ${err.message}`, err);
            });
        });
    }
async pollRegistry ( ) { this . delay = new Delay ( ) ; await this . delay . wait ( this . ttl / 2 ) ; if ( this . isDeregistered ) return ; const response = await this . httpClient . patch ( ` ${ this . baseURL } ${ this . identifier } ` ) . expect ( 200 ) . send ( ) ; await response . getData ( ) ; setImmediate ( ( ) => { this . pollRegistry ( ) . catch ( ( err ) => { log . error ( ` ${ this . identifier } ${ this . serviceName } ${ err . message } ` , err ) ; } ) ; } ) ; }
call the registry in double the required frequency
 @return     {Promise}  undefined
call the registry in double the required frequency @return { Promise } undefined
// don't update after the service was de-registered // call the registry and let them know that we're alive // consume the data, else the http2 stream will stay open // run again. important: without the setImmediate call the process may  // leak memory