Coder Social home page Coder Social logo

Comments (3)

tiagosiebler avatar tiagosiebler commented on August 22, 2024

I think I see why this is happening. The ws client has a dependency on the REST client:
https://github.com/tiagosiebler/bybit-api/blob/master/src/websocket-client.ts#L217-L225

This is primarily for the time offset (used during authentication as part of the timestamp sent to the server). The REST client has a timer running (for the timestamp offset) that queries the time endpoint at intervals to estimate latency. That timer must be keeping the process running.

If you do want to close the process, why not call process.exit()?
https://nodejs.org/api/process.html#processexitcode

from bybit-api.

doppelgunner avatar doppelgunner commented on August 22, 2024

you are a genius!!!

from bybit-api.

zhaoxiaohai avatar zhaoxiaohai commented on August 22, 2024

I think I see why this is happening. The ws client has a dependency on the REST client: https://github.com/tiagosiebler/bybit-api/blob/master/src/websocket-client.ts#L217-L225

This is primarily for the time offset (used during authentication as part of the timestamp sent to the server). The REST client has a timer running (for the timestamp offset) that queries the time endpoint at intervals to estimate latency. That timer must be keeping the process running.

If you do want to close the process, why not call process.exit()? https://nodejs.org/api/process.html#processexitcode

Is there any other way to just shut it down? I also need the process to continue running, just temporarily closing the connection

from bybit-api.

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.