From b3fb22d427a2c18ef37858c39e96783493d0178b Mon Sep 17 00:00:00 2001 From: armin-25689 <83564821+armin-25689@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:22:43 +0800 Subject: [PATCH] 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 --- libgamestream/http.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgamestream/http.c b/libgamestream/http.c index 9a04c71..795fb0d 100644 --- a/libgamestream/http.c +++ b/libgamestream/http.c @@ -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);