Skip to content

Commit

Permalink
Support ConnectTimeout (fix #132)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Jan 6, 2017
1 parent 147159f commit e77f0c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ With the wrapper, `ssh` will *always* be called with an updated `~/.ssh/config`

### master (unreleased)

* No entry
* Support `ConnectTimeout` ([#132](https://github.com/moul/advanced-ssh-config/issues/132))

[Full commits list](https://github.com/moul/advanced-ssh-config/compare/v2.5.0...master)

Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func proxyGo(host *config.Host, dryRun bool) error {
defer beforeConnectDrivers.Close()

Logger.Debugf("Connecting to %s:%s", host.HostName, host.Port)
conn, err := net.Dial("tcp", fmt.Sprintf("%s:%s", host.HostName, host.Port))
conn, err := net.DialTimeout("tcp", fmt.Sprintf("%s:%s", host.HostName, host.Port), time.Duration(host.ConnectTimeout) * time.Second)
if err != nil {
// OnConnectError hook
connectHookArgs.Error = err
Expand Down

0 comments on commit e77f0c9

Please sign in to comment.