-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting async timeout on WebSocketClient does not seem to timeout writes #847
Comments
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@lachlan-roberts have you verified the behaviors documented by the OP on Jetty 10? |
@joakime this is implemented in Jetty 10 but not in Jetty 9.4, we seem to have setters for it in various places in 9.4 but it doesn't look like the setting is used. Should I look at bringing this into 9.4.x or it is only a feature for Jetty 10? |
I will also need to add the writeTimeout to the |
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
…eout Issue #847 - deprecate asyncWriteTimeout in the jetty websocket API
Version: Jetty 9.3.6.
I am using jetty web socket native web socket implementation (not JSR-356).
I enabled the async write timeout on WebSocketClient to be greater than the max idle timeout. Looking through the Jetty code, it looks like the async write timeout is required to be larger than max idle (makes sense to me).
I ran the following test;
a) RemoteEndpoint.sendString(String data) [* blocking]
b) RemoteEndpoint.sendString(String data, WriteCallback callback)
c) RemoteEndpoint.sendStringByFuture(String data)
With a);
The web socket closes after ~19 seconds.
With b);
I get a writeSuccess callback invoked, even though the data could not have been sent. I would not have expected this, since the data could not be sent. Is this callback for the status of the write to the queue rather than actually transmission of the data?
The web socket closes after ~19 seconds.
With c);
The web socket closes after ~19 seconds.
For the two async send API's above (b & c), I would have expected that the write for sending the data (@ point 2) would timeout once the async write timeout is exceeded.
Is this an incorrect assumption, if so can you give an overview as to what the async write timeout is for? Also could you advise me how or if I can configure Jetty to timeout sending data after a defined timeout.
The text was updated successfully, but these errors were encountered: