]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/Pipe: reset replaced pipes
authorSage Weil <sage@inktank.com>
Tue, 11 Jun 2013 18:38:44 +0000 (11:38 -0700)
committerSage Weil <sage@inktank.com>
Thu, 13 Jun 2013 17:52:18 +0000 (10:52 -0700)
This gives the ms_handle_reset call a chance to clean up (for example, by
breaking a con->priv <-> session reference cycle).

Signed-off-by: Sage Weil <sage@inktank.com>
src/msg/Pipe.cc

index 789f7906254e0d9b0936e17cc710b274985172ae..8b7e479add9234dfa46ddcbde0d1007d863be6ed 100644 (file)
@@ -564,6 +564,9 @@ int Pipe::accept()
   replaced = true;
 
   if (!existing->policy.lossy) {
+    // queue a reset on the old connection
+    msgr->dispatch_queue.queue_reset(connection_state.get());
+
     // drop my Connection, and take a ref to the existing one. do not
     // clear existing->connection_state, since read_message and
     // write_message both dereference it without pipe_lock.