Merge pull request #3306 from cgwalters/curl-assert

curl: Assert that curl_multi_assign worked
This commit is contained in:
Colin Walters 2024-09-18 18:34:08 -04:00 committed by GitHub
commit 05442f2a92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -517,7 +517,8 @@ addsock (curl_socket_t s, CURL *easy, int action, OstreeFetcher *fetcher)
fdp->refcount = 1;
fdp->fetcher = fetcher;
setsock (fdp, s, action, fetcher);
curl_multi_assign (fetcher->multi, s, fdp);
CURLMcode rc = curl_multi_assign (fetcher->multi, s, fdp);
g_assert_cmpint (rc, ==, CURLM_OK);
g_hash_table_add (fetcher->sockets, fdp);
}