Commit 6741cd04 authored by Peter Jankuliak's avatar Peter Jankuliak
Browse files

Fix injector.cpp compilation

Implementing the is_open function for a generic reader is tricky,
especially since we have the MultiPeerReader class. It is simpler to
just react to errors from these classes and proclaim them closed once an
error occurs.
parent 745d0761
......@@ -365,7 +365,8 @@ public:
template<class Response, class Connection>
bool keep_connection(const Request& rq, const Response& rs, Connection con) {
if (!con.is_open()) return false;
// NOTE: `con` is put back to `origin_pools` from its destructor unless it
// is explicitly closed.
if (!rs.keep_alive() || !rq.keep_alive()) {
con.close();
......
Supports Markdown
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