Giter Club home page Giter Club logo

Comments (6)

baloian avatar baloian commented on July 17, 2024 1

@bennyn thanks a lot. I will checkout the new version later sometime. For now I am closing the issue.

from coinbase-pro-node.

bennycode avatar bennycode commented on July 17, 2024

Thanks for reporting. It looks reconnecting-websocket (the library which I use) is trying to do something smart. Have you checked what happens when you adjust the connectionTimeout given to the WebSocketClient.connect method?

from coinbase-pro-node.

baloian avatar baloian commented on July 17, 2024

Yes, I tried, 4, 8 and 10 seconds but result is the same. This is why I asked you to provide arguments for the connect method.

from coinbase-pro-node.

baloian avatar baloian commented on July 17, 2024

@bennyn , I ended up implementing my own websocket tracker. I believe it is not the best one, but it has been running for more than 6 hours and there is NO single interruption, though I implemented reconnection mechanism as well. Check it out here.

Once you solve that issue and update your repo please let me know. Looks like the main problem is the library you use.

Feel free to close the issue if you think it is not relevant anymore.

from coinbase-pro-node.

bennycode avatar bennycode commented on July 17, 2024

Thanks for you input. I pushed big improvements to the WebSocket implementation of "coinbase-pro-node" today. These are available in v1.6.1.

I also updated the WebSocket example to describe the full lifecycle (connect → subscribe → unsubscribe → disconnect). There now is a demo script which is executable and connects to the ticker to test the lifecycle. When removing the disconnecting part, then I am able to run it without interruptions. It even reconnects when switching my computer to "Airplane mode" and back again. ✈

Looking at your previous code I noticed that you subscribed to the channel without waiting for the open event. That can cause a lot of troubles since you may send subscribe messages to a channel which is not open to receive messages. Your current code waits for "open" before sending messages, so that's good. 👍

from coinbase-pro-node.

bennycode avatar bennycode commented on July 17, 2024

Cool. I sent you a pull request which should make testing easier: https://github.com/baloian/cetracker/pull/4

from coinbase-pro-node.

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.