Skip to content
Snippets Groups Projects

Fix return value when p->peeked is true

Merged Rick Parrish requested to merge Ree/js_socket_recv-fix into master

When p->peeked is true it's possible for the return value of js_socket_recv to be off-by-one.

This change moves the total += ret line before the MSG-WAITALL check, and then returns total instead of ret to ensure the peeked byte is accounted for in the return value.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading