input_curl: call curl_multi_info_read() in constructor

To check for early connect failures, call curl_multi_info_read() in
the constructor input_curl_open().  This fixes an assertion failure.
This commit is contained in:
Max Kellermann 2009-01-15 16:12:11 +01:00
parent 09e06d9416
commit fa3899f7b0
2 changed files with 7 additions and 0 deletions

1
NEWS
View File

@ -26,6 +26,7 @@ MPD 0.14.1 - not yet released
* input_curl:
- use select() to eliminate busy loop during connect
- honour http_proxy_* config directives
- fix assertion failure on "connection refused"
* log: automatically append newline
* fix setenv() conflict on Solaris
* configure.ac: check for pkg-config before using it

View File

@ -926,6 +926,12 @@ input_curl_open(struct input_stream *is, const char *url)
return false;
}
ret = input_curl_multi_info_read(is);
if (!ret) {
input_curl_free(is);
return false;
}
return true;
}