Skip to content

Commit 28a5bed

Browse files
saschagrunertk8s-publishing-bot
authored andcommitted
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: 24f6ab9b438522e333af5acb5785976c7922106c
1 parent 720ea49 commit 28a5bed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/portforward/portforward_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ func (c *fakeConnection) CloseChan() <-chan bool {
6969
return c.closeChan
7070
}
7171

72+
func (c *fakeConnection) RemoveStreams(_ ...httpstream.Stream) {
73+
}
74+
7275
func (c *fakeConnection) SetIdleTimeout(timeout time.Duration) {
7376
// no-op
7477
}

0 commit comments

Comments
 (0)