]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: fix WAIT connection race handling
authorSage Weil <sage@newdream.net>
Fri, 30 Jan 2009 19:00:43 +0000 (11:00 -0800)
committerSage Weil <sage@newdream.net>
Fri, 30 Jan 2009 19:00:43 +0000 (11:00 -0800)
Not sure why it wasn't setting STATE_WAIT before.  Works now.

src/msg/SimpleMessenger.cc

index 1110ba428bcd8fac4d9c69c908049f83c9f201a4..25d7088be0f6e4bec9372f5c820d0fe26946d41f 100644 (file)
@@ -1298,7 +1298,8 @@ int Rank::Pipe::connect()
     }
 
     if (reply.tag == CEPH_MSGR_TAG_WAIT) {
-      dout(3) << "connect got WAIT (connection race), and lo, the wait is already over" << dendl;
+      dout(3) << "connect got WAIT (connection race)" << dendl;
+      state = STATE_WAIT;
       goto stop_locked;
     }
 
@@ -1736,7 +1737,7 @@ void Rank::Pipe::writer()
 {
   lock.Lock();
 
-  while (state != STATE_CLOSED) { // && state != STATE_WAIT) {
+  while (state != STATE_CLOSED) {// && state != STATE_WAIT) {
     // standby?
     if (!q.empty() && state == STATE_STANDBY)
       state = STATE_CONNECTING;