Revert "fix: Improve error handling in HTTP client and free socket pointer in worker thread"
This reverts commit 25e8e1bb34.
This commit is contained in:
@@ -935,9 +935,7 @@ void* handle_http_client(void* arg)
|
|||||||
{
|
{
|
||||||
ssize_t sent = send(client_socket, (char*)data_to_send + total_sent,
|
ssize_t sent = send(client_socket, (char*)data_to_send + total_sent,
|
||||||
size_to_send - total_sent, 0);
|
size_to_send - total_sent, 0);
|
||||||
if (sent == -1)
|
if (sent <= 0)
|
||||||
perror("Send failed!");
|
|
||||||
else if (sent <= 0)
|
|
||||||
break;
|
break;
|
||||||
total_sent += sent;
|
total_sent += sent;
|
||||||
}
|
}
|
||||||
@@ -1776,7 +1774,6 @@ void* worker_thread(void* arg)
|
|||||||
*socket_ptr = task->socket_fd;
|
*socket_ptr = task->socket_fd;
|
||||||
handle_https_client(socket_ptr);
|
handle_https_client(socket_ptr);
|
||||||
}
|
}
|
||||||
free(socket_ptr);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user