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

Skip extra heartbeats when no data provided #1022

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

gandarez
Copy link
Member

This PR fixes reading extra heartbeat when the flag is set to true but no data was provided.

current log

failed to read extra heartbeats: failed parsing: failed to json decode from data \"\": unexpected end of JSON input

@gandarez gandarez self-assigned this Jan 18, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e983264) 62.95% compared to head (eed6d94) 62.96%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@             Coverage Diff             @@
##           develop    #1022      +/-   ##
===========================================
+ Coverage    62.95%   62.96%   +0.01%     
===========================================
  Files          374      374              
  Lines        15960    15965       +5     
===========================================
+ Hits         10048    10053       +5     
  Misses        5378     5378              
  Partials       534      534              
Flag Coverage Δ
unittests 62.96% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/params/params.go 85.96% <100.00%> (+0.09%) ⬆️

@gandarez gandarez merged commit 7ec63d7 into develop Jan 18, 2024
19 checks passed
@gandarez gandarez deleted the bugfix/skip-extra-heartbeat branch January 18, 2024 21:36
@alanhamlett
Copy link
Member

Good catch. So this only resulted in an error logged, but the main heartbeat was still sent to the api and not lost. It's good this cleans up the ~/.wakatime/wakatime.log so it's not noisy.

@alanhamlett alanhamlett mentioned this pull request Feb 6, 2024
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.

None yet

3 participants