mcavage / node-ssh-agent

Node.js client library for interacting with the OpenSSH Agent
MIT License
23 stars 9 forks source link

Use default object when options is falsy #4

Closed trdarr closed 8 years ago

trdarr commented 9 years ago

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).

Fixes #3 (and the tests).

bahamas10 commented 9 years ago

ah, i didn't see this when i created https://github.com/mcavage/node-ssh-agent/pull/5, as at first i thought this was a node-manta problem and not a problem with this module.

trdarr commented 8 years ago

Closing because #5 has been merged.