This commit is contained in:
Dan Sosedoff
2016-01-22 12:12:00 -06:00
parent 5e47e8bd29
commit 951bec8596
2 changed files with 4 additions and 4 deletions

View File

@@ -132,6 +132,8 @@ func (tunnel *Tunnel) Configure() error {
}
func (tunnel *Tunnel) Start() {
defer tunnel.Close()
for {
conn, err := tunnel.Listener.Accept()
if err != nil {
@@ -140,8 +142,6 @@ func (tunnel *Tunnel) Start() {
go tunnel.handleConnection(conn)
}
tunnel.Close()
}
func NewTunnel(sshInfo *shared.SSHInfo, dbUrl string) (*Tunnel, error) {