Skip to content

Added function to restart ws connection.#228

Open
tekwani wants to merge 1 commit into
bitfinexcom:masterfrom
tekwani:features/ws-disconnection-timer
Open

Added function to restart ws connection.#228
tekwani wants to merge 1 commit into
bitfinexcom:masterfrom
tekwani:features/ws-disconnection-timer

Conversation

@tekwani
Copy link
Copy Markdown

@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
Copy Markdown
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

Comment thread lib/ao_host.js
this.emit('meta:reload')
const sinceLastMessage = Date.now() - this.lastMessageTime
// check if packet delay timed out
if (sinceLastMessage > this.packetWDDelay) {
Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants