By remember that a connection is no longer usable when we notice that,
we prevent a case where we could pretend that it will be usable when
it has finished processing the current queries and responses, which
is not true.
}
/* whether the underlying socket has been closed under our feet, basically */
- bool isUsable() const
+ bool isUsable()
{
if (!d_handler) {
+ d_connectionDied = true;
return false;
}
- return d_handler->isUsable();
+ if (d_handler->isUsable()) {
+ return true;
+ }
+
+ d_connectionDied = true;
+ return false;
}
const std::shared_ptr<DownstreamState>& getDS() const