Skip to content
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

How to ensure that cometd performs a rehandshake for TimeoutException scenario ? #1195

Open
inspire99 opened this issue Jun 8, 2022 · 3 comments
Labels

Comments

@inspire99
Copy link

CometD version(s) 3.1.3

Java version & vendor (use: java -version) Java 1.8

Question There are scenarios when META_HANDSHAKE or META_CONNECT or META_SUBSCRIBE fails, due to TimeoutException, and the bayeuxClient is terminated.

Is it possible to configure the behavior, to never terminate the bayeuxClient, under these circumstances ?

@sbordet
Copy link
Member

sbordet commented Jun 8, 2022

That is already the current behavior: BayeuxClient enters a loop where it retries /meta/connect and then /meta/handshake.
It is not terminated.

If you see otherwise, then it's something else, probably the server asking the client to terminate, so it's an application behavior.

@inspire99
Copy link
Author

@sbordet , Is there a easy way to reproduce TimeOutException for META_HANDSHAKE or META_CONNECT ?
For example, recently I tried disconnecting from WiFi, I got NoRouteToHostException and UnknownHostException.

I am looking for scenarios, as to how to reproduce TimeOutException.

Could you please share ?
Thank you.

@sbordet
Copy link
Member

sbordet commented Aug 18, 2022

You should set HttpClient.idleTimeout to a small value like 1000 (1 second) or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants