Răsfoiți Sursa

On tunnel close, log any SSH client error

Rod Hynes 9 ani în urmă
părinte
comite
e5039f5c14
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      psiphon/tunnel.go

+ 5 - 0
psiphon/tunnel.go

@@ -235,6 +235,11 @@ func (tunnel *Tunnel) Close(isDiscarded bool) {
 		tunnel.sshClient.Close()
 		tunnel.sshClient.Close()
 		// tunnel.conn.Close() may get called multiple times, which is allowed.
 		// tunnel.conn.Close() may get called multiple times, which is allowed.
 		tunnel.conn.Close()
 		tunnel.conn.Close()
+
+		err := tunnel.sshClient.Wait()
+		if err != nil {
+			NoticeAlert("close tunnel ssh error: %s", err)
+		}
 	}
 	}
 }
 }