SolidWallOfCode commented on a change in pull request #8062:
URL: https://github.com/apache/trafficserver/pull/8062#discussion_r670623921
##########
File path: src/tscore/ink_sock.cc
##########
@@ -111,6 +112,26 @@ safe_clr_fl(int fd, int arg)
return flags;
}
+int
+safe_write(int fd, const char *buffer, int len)
+{
+ int num_written = 0;
+ while (num_written < len) {
Review comment:
I think this should be re-ordered such that the `write` is attempted
first, and only if that doesn't fully succeed should `write_ready` be invoked.
That reduces the impact of calling this for the (by far) common case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]