Commit ed5f17c9 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Send instead of write.

parent 863728b7
Pipeline #2966 passed with stages
in 1 minute and 41 seconds
...@@ -113,7 +113,7 @@ static inline ssize_t _send(socket_t conn, const char *buf, size_t size) ...@@ -113,7 +113,7 @@ static inline ssize_t _send(socket_t conn, const char *buf, size_t size)
int written = 0; int written = 0;
ssize_t n = 0; ssize_t n = 0;
while (written < size) { while (written < size) {
n = write(conn, buf, size - written); n = send(conn, buf, size - written, 0);
if (n < 0) { if (n < 0) {
_time(); _time();
printf("WRITE FAILED: %ld, errno: %d\n", n, errno); printf("WRITE FAILED: %ld, errno: %d\n", n, errno);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment