// hooray!
peer_global_seq = reply.global_seq;
- policy.lossy = reply.flags & CEPH_MSG_CONNECT_LOSSY;
+ if (!disposable) {
+ policy.lossy = reply.flags & CEPH_MSG_CONNECT_LOSSY;
+ }
state = STATE_OPEN;
connect_seq = cseq + 1;
assert(connect_seq == reply.connect_seq);
if (sent.empty() && close_on_empty) {
// this is slightly hacky
dout(10) << "writer out and sent queues empty, closing" << dendl;
+ policy.lossy = true;
fault();
continue;
}
dout(1) << "mark_disposable " << con << " -- " << p << dendl;
p->pipe_lock.Lock();
p->policy.lossy = true;
+ p->disposable = true;
p->pipe_lock.Unlock();
p->put();
} else {
bool keepalive;
bool halt_delivery; //if a pipe's queue is destroyed, stop adding to it
bool close_on_empty;
+ bool disposable;
__u32 connect_seq, peer_global_seq;
uint64_t out_seq;
state(st),
connection_state(new Connection),
reader_running(false), reader_joining(false), writer_running(false),
- in_qlen(0), keepalive(false), halt_delivery(false), close_on_empty(false),
+ in_qlen(0), keepalive(false), halt_delivery(false),
+ close_on_empty(false), disposable(false),
connect_seq(0), peer_global_seq(0),
out_seq(0), in_seq(0), in_seq_acked(0),
reader_thread(this), writer_thread(this) {