Code Monkey home page Code Monkey logo

Comments (7)

enisdenjo avatar enisdenjo commented on May 19, 2024 1

Hi @Shahor, thanks for reporting this - it is most probably a bug! I have a hunch about what causes it, will fix it probably together with the upcoming PR.

Regarding the retryStrategy in #84 - I like the idea a lot! Will include this in the PR, thanks for the suggestion. 👍

from graphql-ws.

Shahor avatar Shahor commented on May 19, 2024 1

Ah, that is great news thanks for considering it 🙇

I'd be happy to test this in my environment if you want once ready.

from graphql-ws.

Shahor avatar Shahor commented on May 19, 2024 1

@enisdenjo You rock 💪

from graphql-ws.

Shahor avatar Shahor commented on May 19, 2024

Hey @enisdenjo 👋

Great on work on the graphql-ws library!

I'm fighting a bit with this issue this morning, I'm seeing a double problem here:

  • When my server restarts, the client waits retryTimeout before making a new connection, but if the server is not started yet when the retryTimeout is done, it'll just loop retryAttempts times without respecting the retryTimeout. What can I do to make sure retryTimeout (or retryStrategy(tryNumber: number)) is properly awaited?

The scenario down below is happening with the following configuration:

return new SubscriptionLink({
      url: subscriptionsEndpoint,
      retryTimeout: 30e3,
      on: { /* event handlers */ }
})

image

As you can see, the retryTimeout is not used for the socket reconnection attempts.

  • I've see the pr #84 , I think it would be nice to actually give access to the retryStrategy ala ioredis so everyone can implement their own backoff strategy according to their needs, wdyt?

from graphql-ws.

Shahor avatar Shahor commented on May 19, 2024

@enisdenjo I am very sorry for being pushy with this, is there any chance you'd have an ETA for at least the buggy part?

I'm happy to help if needed to make this move forward :) (It's blocking us a bit as we're switching to graphql-ws because of a bug that it fixes compared to subscriptions-transport-ws)

Just let me know if I can help you on this :)

from graphql-ws.

enisdenjo avatar enisdenjo commented on May 19, 2024

No worries, I can understand!

I'll try pushing the fix later today (am currently swamped with my day job, as soon as I am done - I'll come back to the PR).

from graphql-ws.

enisdenjo avatar enisdenjo commented on May 19, 2024

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from graphql-ws.

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.