nghttpx: Call disconnect() when memcached connection cannot be made
This commit is contained in:
parent
f1b163a32c
commit
6ad332b801
|
@ -532,11 +532,10 @@ int MemcachedConnection::add_request(std::unique_ptr<MemcachedRequest> req) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn_.fd == -1) {
|
if (conn_.fd == -1 && initiate_connection() != 0) {
|
||||||
if (initiate_connection() != 0) {
|
disconnect();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue