Skip to content

Commit d825f50

Browse files
committed
Log error message for curl_easy_setopt
1 parent 36a8f4a commit d825f50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/engine/client/dl_main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,10 @@ class CurlDownload {
163163
}
164164

165165
bool SetOptions(Str::StringRef url) {
166+
CURLcode err;
166167
#define SETOPT(option, value) \
167-
if (curl_easy_setopt(request_, option, value) != CURLE_OK) { \
168-
downloadLogger.Warn("Setting " #option " failed"); \
168+
if ((err = curl_easy_setopt(request_, option, value)) != CURLE_OK) { \
169+
downloadLogger.Warn("Setting " #option " failed: %s", curl_easy_strerror(err)); \
169170
return false; \
170171
}
171172

0 commit comments

Comments
 (0)