entity_addr_t peer_addr;
unsigned features;
RefCountedObject *pipe;
+ bool failed; /// true if we are a lossy connection that has failed.
int rx_buffers_version;
map<tid_t,pair<bufferlist,int> > rx_buffers;
public:
- Connection() : lock("Connection::lock"), priv(NULL), peer_type(-1), features(0), pipe(NULL),
- rx_buffers_version(0) {}
+ Connection()
+ : lock("Connection::lock"),
+ priv(NULL),
+ peer_type(-1),
+ features(0),
+ pipe(NULL),
+ failed(false),
+ rx_buffers_version(0) {
+ }
~Connection() {
//generic_dout(0) << "~Connection " << this << dendl;
if (priv) {
return NULL;
}
void clear_pipe(RefCountedObject *old_p) {
- if(old_p == pipe) {
+ if (old_p == pipe) {
Mutex::Locker l(lock);
pipe->put();
pipe = NULL;
+ failed = true;
}
}
void reset_pipe(RefCountedObject *p) {