Skip to content

Restart all ws connections on packet delay setting update.#243

Open
tekwani wants to merge 4 commits intobitfinexcom:masterfrom
tekwani:features/ws-disconnection-timer
Open

Restart all ws connections on packet delay setting update.#243
tekwani wants to merge 4 commits intobitfinexcom:masterfrom
tekwani:features/ws-disconnection-timer

Conversation

@tekwani
Copy link
Copy Markdown
Contributor

@tekwani tekwani commented Aug 14, 2023

Restart all ws connections on packet delay setting update.
Send heartbeat messages to ws connections to monitor ws server connection to check packet delay timeout for meta reload event.

Send heartbeat messages to ws connections to monitor ws server connection to check packet delay timeout for meta reload event.
packetWDDelay,
autoResumeAOs,
showOptInModal,
// showOptInModal,
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.

Optional: We can just remove it if not required. Same, for other respective comments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment thread lib/ws_servers/api/start_connections.js Outdated
const strategyManager = session.getStrategyManager()
if (strategyManager) {
const { apiKey, apiSecret } = session.getCredentials()
strategyManager.restartConnection(apiKey, apiSecret, 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.

promise is ignored

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment thread lib/exchange_clients/bitfinex/index.js Outdated
Comment on lines +162 to +166
if (sinceLastMessage > this.packetWDDelay) {
return true
}

return false
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.

Suggested change
if (sinceLastMessage > this.packetWDDelay) {
return true
}
return false
return sinceLastMessage > this.packetWDDelay

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines +152 to +156
if (sinceLastMessage > this.packetWDDelay) {
return true
}

return false
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.

Suggested change
if (sinceLastMessage > this.packetWDDelay) {
return true
}
return false
return sinceLastMessage > this.packetWDDelay

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

tarcisiozf
tarcisiozf previously approved these changes Aug 31, 2023
# Conflicts:
#	lib/ws_servers/api/handlers/strategy/strategy_manager.js
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