The SSHAgentClient constructor did not set this.timeout when options was falsy which resulted in a TypeError when #_request called Socket#setTimeout with undefined as the first argument. This pull request adds an object containing the default value of timeout to remove the conditional, ensuring that this.timeout is set—unless options is truthy but not an object (e.g., a Number).
The SSHAgentClient constructor did not set
this.timeout
whenoptions
was falsy which resulted in a TypeError when#_request
calledSocket#setTimeout
withundefined
as the first argument. This pull request adds an object containing the default value oftimeout
to remove the conditional, ensuring thatthis.timeout
is set—unlessoptions
is truthy but not an object (e.g., a Number).Fixes #3 (and the tests).