TUN-2955: Fix connection and goroutine leaks when tunnel conection is terminated on error. Only unregister tunnels that had connected successfully. Close edge connection used to unregister the tunnel. Use buffered channels for error channels where receiver may quit early on context cancellation.

This commit is contained in:
Igor Postelnik
2020-05-05 17:56:39 -05:00
committed by Chung Ting Huang
parent c3fa4552aa
commit fbe2989f61
5 changed files with 35 additions and 9 deletions

View File

@@ -521,6 +521,7 @@ type TunnelServer_PogsClient struct {
}
func (c TunnelServer_PogsClient) Close() error {
c.Client.Close()
return c.Conn.Close()
}