-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
[sctp] make write
sync
#344
Conversation
Codecov ReportBase: 59.36% // Head: 59.52% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #344 +/- ##
==========================================
+ Coverage 59.36% 59.52% +0.15%
==========================================
Files 503 503
Lines 47666 47646 -20
Branches 12668 12583 -85
==========================================
+ Hits 28299 28362 +63
- Misses 9898 9902 +4
+ Partials 9469 9382 -87
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Returning Poll::Ready(Ok(n)) when write_fut is Some is incorrect since buf already contains new data and we should instead always return Poll::Ready(Ok(buf.len())) and update write_fut. In the future, if/when we make write synchronous, this whole block could be simplified to just contain a single call (1 line) to write. See #344
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.
LGTM
There's no reason for it to be async because it just buffers the data in memory (actual IO is happening in a separate thread).