Skip to content

Fix timing issue with heartbeat and improve connection error logic#11

Open
ashleyghooper wants to merge 2 commits into
lowitea:masterfrom
ashleyghooper:master
Open

Fix timing issue with heartbeat and improve connection error logic#11
ashleyghooper wants to merge 2 commits into
lowitea:masterfrom
ashleyghooper:master

Conversation

@ashleyghooper

@ashleyghooper ashleyghooper commented Jun 6, 2026

Copy link
Copy Markdown

- The variables ERR_NOTIFY_INTERVAL and HEARTBEAT_MIN_INTERVAL
used seconds values, but they are being compared with values
returned from vim.uv.now() which returns milliseconds
- Renamed the variables to clarify the time unit and multiplied
the values by 1000 to give milliseconds durations

Signed-off-by: Ashley Hooper <ashleyghooper@gmail.com>
- Add -X before POST so that POST is correctly received as the request
  type, not the first of several URLs for curl to request
- Add -f so that curl detects all failures such as when a request goes
  via a proxy server (otherwise, any proxied requests are always treated
  as successful)
- Add -s since we are not using the curl output
- Since self.last_error_notify is initialised as nil, modify the error
  notification logic accordingly

Signed-off-by: Ashley Hooper <ashleyghooper@gmail.com>
@ashleyghooper ashleyghooper changed the title Use appropriate values for elapsed time variables Fix timing issue with heartbeat and improve connection error logic Jun 6, 2026
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.

bug: curl invocation is incorrectly specified bug: heartbeat and error notify intervals are for seconds, but vim.uv.now() returns milliseconds

1 participant