mirror of
https://github.com/gravitational/teleport
synced 2024-10-22 18:23:25 +00:00
fix goroutine leak
This commit is contained in:
parent
09671910a3
commit
e7387f6ed1
|
@ -224,6 +224,10 @@ func (a *Agent) proxyTransport(ch ssh.Channel, reqC <-chan *ssh.Request) {
|
|||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
// make sure that we close the client connection on a channel
|
||||
// close, otherwise the other goroutine would never know
|
||||
// as it will block on read from the connection
|
||||
defer conn.Close()
|
||||
io.Copy(conn, ch)
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in a new issue