Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #781 from JoshVanL/automated-cherry-pick-of-#779-o…
Browse files Browse the repository at this point in the history
…rigin-release-0.6

Automated cherry pick of #779
  • Loading branch information
jetstack-bot authored Mar 15, 2019
2 parents 5df7219 + 7e5dd24 commit 661025b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/tarmak/ssh/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (s *SSH) Tunnel(dest, destPort, localPort string, daemonize bool) interface
destPort: destPort,
daemonize: daemonize,
localPort: localPort,
doneCh: make(chan struct{}),
}

s.tunnels = append(s.tunnels, tunnel)
Expand Down Expand Up @@ -213,7 +214,12 @@ func (t *Tunnel) handleTimeout() {
t.connsLock.Unlock()

t.cleanup()
close(t.doneCh)

select {
case <-t.doneCh:
default:
close(t.doneCh)
}
}

func (t *Tunnel) Done() <-chan struct{} {
Expand Down

0 comments on commit 661025b

Please sign in to comment.