Comments (6)
@dsrees hmm I think I know what could be the issue. If I'm not wrong the reconnectTimer is not initialized.
So basically if the heartbeat fails the connection is closed and nothing more happens.
Could you pls look at that?
from javaphoenixclient.
Hm, good catch. If the heartbeat fails, the reconnect timer is supposed to trigger and attempt to re-establish with the server. I'll take a look into this. Thanks for reporting it!
from javaphoenixclient.
I think this is whats missing AdamGrzybkowski@32c719f
But this still wouldn't make possible for me to know the status of heartbeat push. So I have to use autoreconnect
feature from the lib, because I cannot handle this myself.
from javaphoenixclient.
That commit looks good, if you want to get a PR open
What are you trying to do specifically with the heartbeat?
from javaphoenixclient.
PR created.
About the heartbeat.
Right now we do have a problem that sometimes WS connection is killed without any kind of callback (onError or onClose). The only way to know that it was dropped is the heartbeat (or more precisely when it fails), that's why I thought it would good to know that.
Ofc this is not needed if we can rely on the lib logic to reconnect but sometimes we might want sth more custom.
In my case I always want to keep the connection open so I had to add some reconnection logic when onError
is called as the lib was only handling reconnecting when the WS was closed(as it turned out it didn't :P). Right now to do what I need I will have to have reconnection logic: one handled by me and one by the lib. I would prefer to handle this in one place.
from javaphoenixclient.
Available in 0.1.5
from javaphoenixclient.
Related Issues (20)
- Improve documentation HOT 1
- NPE in trigger() HOT 4
- Websocket is automatically reconnected event when intentionally closed HOT 2
- Leaking bindings when the channel reply times out? HOT 3
- Lots of Timers created HOT 2
- ReconnectAfterMs is too big HOT 1
- Downgrade OKhttp to 3.12.2 HOT 1
- Heartbeat seems to be sent only once (instead of every x seconds) HOT 2
- Reconnection strategy documentation HOT 8
- Decoding message payloads HOT 2
- ConcurrentModificationException crash HOT 3
- java.util.ConcurrentModificationException HOT 4
- JSON serialization defaults modify property names HOT 2
- jcenter shutdown - February 2022 HOT 3
- Message.payload marked as non-nullable but can be null HOT 7
- Tries to reconnect with invalid token HOT 3
- Leaving channel causes timeout HOT 5
- `unmatched topic` after reconnect HOT 1
- Issue with AGP v8.0.0 R8 minification HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javaphoenixclient.