PortForwardResult does not expose methods to close WebSocketStreamHandler nor expose is state
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
We'd be happy to have a PR to extend support to cover this.
@brendandburns I want to contribute on this issue, can you please suggest a way?
/assing
/assign
/assign
i am new to open source contribution , i tried but it didn't work. If someone works on this please do take me with you as i'll try my best to understand and eventually will try to help.
/assign I don't know much about java, but i know C. I would like to give it a try. new to open source. Will try my best.
@brendandburns I don't know much right now. How much time do I have to resolve this Issue? Asked this to get an idea about how much time i have to learn.
/assign
@SanjayVas, is this still available?
@rukundob451 Not sure what you mean by that question. If you're asking if it's still an issue, then yes. If you're asking whether the maintainers would be accepting of a PR to fix address it, I'm not the right person to ask. I'm just the person that filed the issue, not a maintainer of this repo.