in src/client.ts [51:64]
constructor(transport: Client.Transport, restApiClient?: RestApiClient) {
super();
/*Codes_SRS_NODE_IOTHUB_CLIENT_05_001: [The Client constructor shall throw ReferenceError if the transport argument is falsy.]*/
if (!transport) throw new ReferenceError('transport is \'' + transport + '\'');
this._transport = transport;
this._restApiClient = restApiClient;
if (this._restApiClient && this._restApiClient.setOptions) {
this._restApiClient.setOptions({ http: { agent: new Agent({ keepAlive: true }) } });
}
/*Codes_SRS_NODE_IOTHUB_CLIENT_16_021: [The `Client` constructor shall initialize the default retry policy to `ExponentialBackoffWithJitter` with a maximum timeout of 4 minutes.]*/
this._retryPolicy = new ExponentialBackOffWithJitter();
}