-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Description
Describe the bug
PortForwardResult's underlying WebSocketStreamHandler will remain open unless the WebSocket is closed remotely. Furthermore, PortForwardResult's methods that return streams will throw an IllegalStateException if the handler is closed, but does not expose a way to check the handler state to avoid the exception.
This is related to #865 but more specific.
Client Version
16.0.0
Kubernetes Version
1.24.0
Java Version
Java 11
To Reproduce
Steps to reproduce the behavior:
- Call PortForward.forward
- Call
getInputStream/getOutputStreamon the result with try-with-resources pattern
Expected behavior
- There is a way to check the state to avoid an IllegalStateExeption, e.g. exposing WebSocketStreamHandler.state via PortForwardResult.
- There is a way to close the underlying WebSocketStreamHandle, e.g. having PortForwardResult implement AutoCloseable and closing the WebSocketStreamHandle on
close.
Server (please complete the following information):
- OS: Linux (Debian Bookworm)
- Environment: KinD
- Cloud: None
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.