]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: fix pipe replacement assert
authorSage Weil <sage@inktank.com>
Wed, 27 Jun 2012 00:10:40 +0000 (17:10 -0700)
committerSage Weil <sage@inktank.com>
Tue, 3 Jul 2012 00:54:00 +0000 (17:54 -0700)
We may replace an existing pipe in the STANDBY state if the previous
attempt failed during accept() (see previous patches).

This might fix #1378.

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

index e345bcb93171537eac1b470e3717835e9eb7fb6f..9835c35d9e3e757299d65363fce48e147fae8868 100644 (file)
@@ -824,7 +824,8 @@ int SimpleMessenger::Pipe::accept()
                             << " == " << connect.connect_seq
                             << dendl;
          assert(existing->state == STATE_CONNECTING ||
-                existing->state == STATE_OPEN); // this will win
+                existing->state == STATE_OPEN ||
+                existing->state == STATE_STANDBY);
          reply.tag = CEPH_MSGR_TAG_WAIT;
          existing->pipe_lock.Unlock();
          msgr->lock.Unlock();