We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8ce81b commit d47af4cCopy full SHA for d47af4c
src/socket.ts
@@ -400,7 +400,11 @@ export class FluentSocket extends EventEmitter {
400
* @returns A new socket to use for the connection
401
*/
402
private createTlsSocket(): tls.TLSSocket {
403
- return tls.connect({...this.tlsOptions, ...this.socketParams});
+ let opts: net.NetConnectOpts = {...this.tlsOptions, ...this.socketParams};
404
+ if (this.timeout >= 0) {
405
+ opts = {...opts, timeout: this.timeout};
406
+ }
407
+ return tls.connect(opts);
408
}
409
410
/**
0 commit comments