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

When socket server restart, onClose callback runs in Infinite loop? #84

Open
passionofvc opened this issue Jan 18, 2018 · 6 comments
Open

Comments

@passionofvc
Copy link

hi @sublimator
I use ripple-lib-java(com.ripple.client) to connect to rippled daemon server
for new validated transaction,
when socket server restart rippled, I found onClose callback runs in Infinite loop,
and continue to connect and disconnect.
Does the disconnect problem fixed?

        <client>                         < WebSocketTransport >                   <WS(WebSocketClient)>
    --->connect(String , OnConnected)
|--> --->connect(final String uri)
|    --->doConnect(String uri) -------- |
|                                       |--->ws.connect(URI.create(uri)); --|
|                                                                           |------>   ws.connect();
|
|                                                                              |----<---  onClose()  when socket server restart, callback here
|                                    |--<---handler.onDisconnected(false); <---|
|    <----onDisconnected(boolean) <--|
| -----<----doOnDisconnected()

@sublimator
Copy link
Contributor

sublimator commented Jan 18, 2018 via email

@sublimator
Copy link
Contributor

@passionofvc
Copy link
Author

thanks @sublimator
I will the check out your new repository.

@sublimator
Copy link
Contributor

Also, make sure you are you doing everything from within run(...) blocks or onX(...) handlers, as the API is not thread safe.

@passionofvc
Copy link
Author

hi @sublimator
I understand all the request and response must
be run by ScheduledThreadPoolExecutor's clientThread,
thanks!

@sublimator
Copy link
Contributor

sublimator commented Jan 19, 2018 via email

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

No branches or pull requests

2 participants