-
Notifications
You must be signed in to change notification settings - Fork 19
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
(OraklNode) Update timer relative to last update time #2174
Conversation
WalkthroughWalkthroughThe changes involve a modification to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- node/pkg/wss/utils.go (1 hunks)
Additional context used
Learnings (2)
Common learnings
Learnt from: nick-bisonai PR: Bisonai/orakl#1524 File: node/pkg/wss/utils.go:0-0 Timestamp: 2024-05-28T05:35:40.840Z Learning: The `Run` method in `WebsocketHelper` now includes a context-based mechanism to exit the loop and a flag (`IsRunning`) to prevent multiple instances from running simultaneously.
node/pkg/wss/utils.go (1)
Learnt from: nick-bisonai PR: Bisonai/orakl#1524 File: node/pkg/wss/utils.go:0-0 Timestamp: 2024-05-28T05:35:40.840Z Learning: The `Run` method in `WebsocketHelper` now includes a context-based mechanism to exit the loop and a flag (`IsRunning`) to prevent multiple instances from running simultaneously.
Additional comments not posted (1)
node/pkg/wss/utils.go (1)
105-105
: Improvement in inactivity timer logic.The change to reset the
inactivityTimer
based on the actual time since the last message enhances the responsiveness of the websocket connection management. This adjustment ensures that the timer reflects the true inactivity duration, potentially improving resource management and preventing unnecessary disconnections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!
Description
previously, wasn't setting timer properly, not having difference from using ticker, through this update, it'll reset timer relatively based on last update time
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Deployment