Bugfix
This commit is contained in:
@ -232,11 +232,11 @@ int client_request_handler(sock *client, int req_num) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = send(client->socket, msg_buf, content_length - snd_len, 0);
|
ret = send(client->socket, msg_buf, content_length - snd_len, 0);
|
||||||
if (ret < 0) {
|
if (ret <= 0) {
|
||||||
print(ERR_STR "Unable to send: %s" CLR_STR, strerror(errno));
|
print(ERR_STR "Unable to send: %s" CLR_STR, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret < 0) {
|
if (ret <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snd_len += ret;
|
snd_len += ret;
|
||||||
@ -251,7 +251,7 @@ int client_request_handler(sock *client, int req_num) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = send(client->socket, buffer, len, 0);
|
ret = send(client->socket, buffer, len, 0);
|
||||||
if (ret < 0) {
|
if (ret <= 0) {
|
||||||
print(ERR_STR "Unable to send: %s" CLR_STR, strerror(errno));
|
print(ERR_STR "Unable to send: %s" CLR_STR, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user