Cleanup portforward streams after their usage

This implements a stream cleanup when using portforwardings. Before
applying this patch, the streams []httpstream.Stream within
`spdy/connection.go` would fill-up for each streaming request. This
could result in heavy memory usage. Now we use the stream identifier to
keep track of them and finally remove them again once they're no longer
needed.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Kubernetes-commit: 6459ed6717d1851f9ca28e3f245672a6a62aa0bf
This commit is contained in:
Sascha Grunert 2021-03-05 13:39:04 +01:00 committed by Kubernetes Publisher
parent ea390324ae
commit 0f6528b1f9

View File

@ -69,6 +69,9 @@ func (c *fakeConnection) CloseChan() <-chan bool {
return c.closeChan
}
func (c *fakeConnection) RemoveStreams(_ ...httpstream.Stream) {
}
func (c *fakeConnection) SetIdleTimeout(timeout time.Duration) {
// no-op
}