]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Dequeue XioMsg on send-fail
authorMatt Benjamin <matt@cohortfs.com>
Tue, 30 Dec 2014 21:51:00 +0000 (16:51 -0500)
committerMatt Benjamin <matt@cohortfs.com>
Wed, 14 Jan 2015 21:44:24 +0000 (16:44 -0500)
If a message send hard fails, don't omit to remove it from the
send_q--this results in an assert when the queue is in safe-mode,
but with safe mode disabled, send_q would be corrupted.

Dont fall through and erase the iterator twice.  Continue the loop,
as in the incoming release case.

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
src/msg/xio/XioPortal.h

index efeaad7df881d72b449e2cc727c8ad262cfd5f81..6c50c9cc8cb9cc529103562a89064b4940525648 100644 (file)
@@ -290,7 +290,9 @@ public:
                }
                  break;
                default:
+                 q_iter = send_q.erase(q_iter);
                  xs->xcon->msg_send_fail(xmsg, code);
+                 continue;
                  break;
                };
              } else {
@@ -300,11 +302,11 @@ public:
              break;
            default:
              /* INCOMING_MSG_RELEASE */
-              q_iter = send_q.erase(q_iter);
+             q_iter = send_q.erase(q_iter);
              release_xio_rsp(static_cast<XioRsp*>(xs));
              continue;
            } /* switch (xs->type) */
-            q_iter = send_q.erase(q_iter);
+           q_iter = send_q.erase(q_iter);
          } /* while */
        } /* size > 0 */