Use net_send() from net_send_all()
This will make net_send_all() continue to work even if net_send() behavior is changed.
This commit is contained in:
parent
3adff37c2d
commit
3eac212af1
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ ssize_t
|
||||||
net_send_all(sc_socket socket, const void *buf, size_t len) {
|
net_send_all(sc_socket socket, const void *buf, size_t len) {
|
||||||
size_t copied = 0;
|
size_t copied = 0;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
ssize_t w = send(socket, buf, len, 0);
|
ssize_t w = net_send(socket, buf, len);
|
||||||
if (w == -1) {
|
if (w == -1) {
|
||||||
return copied ? (ssize_t) copied : -1;
|
return copied ? (ssize_t) copied : -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue