bool closedLocally(const TTransportException& e) { std::string message = e.what(); return (e.getType() == TTransportException::END_OF_FILE) && (message == "socket closed locally"); }
bool wasReset(const TTransportException& e) { return (e.getType() == TTransportException::INTERNAL_ERROR) && (e.getErrno() == ECONNRESET); }