1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2024-12-26 01:18:22 +01:00

fix: SSL socket polling bug
All checks were successful
gitea-sync/antd-lua-plugin/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2022-10-21 12:04:41 +02:00
parent 243e778ac7
commit 22f62fcf77

View File

@ -209,6 +209,10 @@ static void *process(void *data)
struct pollfd pfds[2];
pfds[0].fd = rq->client->sock;
pfds[0].events = POLLIN;
if(rq->client->ssl)
{
pfds[0].events = POLLIN | POLLOUT;
}
pfds[1].fd = cl->sock;
pfds[1].events = POLLIN;
@ -232,7 +236,7 @@ static void *process(void *data)
// we have data
default:
// If data is on webserver
if (pfds[0].revents & POLLIN)
if ((pfds[0].revents & POLLIN) || (rq->client->ssl && (pfds[0].revents & POLLOUT)) )
{
while((ret = antd_recv_upto(rq->client,buff, BUFFLEN)) > 0)
{