fix: it took so long time to connect to the Sunshine host in the FreeBSD

Disable reuse feature for FreeBSD to prevent excessive time from being spent connecting to the Sunshine host
This commit is contained in:
armin-25689 2023-12-31 15:22:43 +08:00 committed by Cameron Gutman
parent 3840b1409e
commit b3fb22d427

View File

@ -73,6 +73,9 @@ int http_init(const char* keyDirectory, int logLevel) {
int http_request(char* url, PHTTP_DATA data) {
curl_easy_setopt(curl, CURLOPT_WRITEDATA, data);
curl_easy_setopt(curl, CURLOPT_URL, url);
#ifdef __FreeBSD__
curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 1);
#endif
if (debug)
printf("Request %s\n", url);