Make sshproxy use a hostmount on master PD (don't spam sshKeys on upgrade/reboot).

Add comment describing what SSHTunnelList.Close() does.
Simplify util.FileExists.
This commit is contained in:
CJ Cullen
2015-06-05 14:49:26 -07:00
parent cb317604ab
commit 04cd9b3c75
4 changed files with 17 additions and 14 deletions

View File

@@ -91,7 +91,6 @@ func (s *SSHTunnel) tunnel(conn net.Conn, remoteHost, remotePort string) error {
}
func (s *SSHTunnel) Close() error {
glog.Infof("Closing tunnel for host: %q", s.Host)
if err := s.client.Close(); err != nil {
return err
}
@@ -183,6 +182,9 @@ func (l SSHTunnelList) Open() error {
return nil
}
// Close asynchronously closes all tunnels in the list after waiting for 1
// minute. Tunnels will still be open upon this function's return, but should
// no longer be used.
func (l SSHTunnelList) Close() {
for ix := range l {
entry := l[ix]