Update socks.c

This commit is contained in:
Vladimir Dubrovin 2022-04-25 13:09:55 +03:00
parent 7e681bbacd
commit 6d77141ecc

View File

@ -305,6 +305,15 @@ fflush(stderr);
param->res = 470; param->res = 470;
break; break;
} }
{
#ifdef _WIN32
unsigned long ul=1;
ioctlsocket(param->remsock, FIONBIO, &ul);
#else
fcntl(param->remsock,F_SETFL,O_NONBLOCK | fcntl(param->remsock,F_GETFL));
#endif
}
#if SOCKSTRACE > 0 #if SOCKSTRACE > 0
fprintf(stderr, "Sending incoming connection to client with code %d for %s with %hu\n", fprintf(stderr, "Sending incoming connection to client with code %d for %s with %hu\n",
param->res, param->res,