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

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tekwani
Copy link
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.
@@ -29,7 +29,7 @@ module.exports = async (server, ws, msg) => {
fullScreen,
packetWDDelay,
autoResumeAOs,
showOptInModal,
// showOptInModal,
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done

const strategyManager = session.getStrategyManager()
if (strategyManager) {
const { apiKey, apiSecret } = session.getCredentials()
strategyManager.restartConnection(apiKey, apiSecret, packetWDDelay)
Copy link
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
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 162 to 166
if (sinceLastMessage > this.packetWDDelay) {
return true
}

return false
Copy link
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
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
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
Contributor Author

Choose a reason for hiding this comment

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

Done

# 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