Commit 6ad332b8 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Call disconnect() when memcached connection cannot be made

parent f1b163a3
......@@ -532,10 +532,9 @@ int MemcachedConnection::add_request(std::unique_ptr<MemcachedRequest> req) {
return 0;
}
if (conn_.fd == -1) {
if (initiate_connection() != 0) {
return -1;
}
if (conn_.fd == -1 && initiate_connection() != 0) {
disconnect();
return -1;
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment