Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added function to restart ws connection. #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tekwani
Copy link

@tekwani tekwani commented Aug 14, 2023

Added function to restart ws connection.
Monitor last ws message received to check packet delay timeout for sending meta reload event.

Monitor last ws message received to check packet delay timeout for sending meta reload event.
Copy link
Contributor

@avsek477 avsek477 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest, lgtm

this.emit('meta:reload')
const sinceLastMessage = Date.now() - this.lastMessageTime
// check if packet delay timed out
if (sinceLastMessage > this.packetWDDelay) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this result in algo orders being stopped and users not being given the option to resume/cancel them in certain cases?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Added packetWDDelay as ws timeout for dms control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants