1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

mpd fix take 2

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1081 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2008-03-30 02:29:12 +00:00
parent 3efefaf182
commit 675b9fac96

View File

@ -117,7 +117,7 @@ static int do_connect_fail(mpd_Connection *connection,
fcntl(connection->sock, F_SETFL, flags | O_NONBLOCK);
return (connect(connection->sock, serv_addr, addrlen) < 0
|| errno != EINPROGRESS);
&& errno != EINPROGRESS);
}
#endif /* !WIN32 */
@ -154,6 +154,9 @@ static int mpd_connect(mpd_Connection *connection, const char *host, int port,
for (res = addrinfo; res; res = res->ai_next) {
/* create socket */
if (connection->sock > -1) {
closesocket(connection->sock);
}
connection->sock = socket(res->ai_family, SOCK_STREAM,
res->ai_protocol);
if (connection->sock < 0) {