Code Monkey home page Code Monkey logo

Comments (6)

AdamGrzybkowski avatar AdamGrzybkowski commented on June 30, 2024

@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.

dsrees avatar dsrees commented on June 30, 2024

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.

AdamGrzybkowski avatar AdamGrzybkowski commented on June 30, 2024

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.

dsrees avatar dsrees commented on June 30, 2024

That commit looks good, if you want to get a PR open

What are you trying to do specifically with the heartbeat?

from javaphoenixclient.

AdamGrzybkowski avatar AdamGrzybkowski commented on June 30, 2024

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.

dsrees avatar dsrees commented on June 30, 2024

Available in 0.1.5

from javaphoenixclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.