From 37719c3b5733aefecd0d8f59007b02042cd40002 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Tue, 30 Dec 2014 16:51:00 -0500 Subject: [PATCH] Dequeue XioMsg on send-fail 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 --- src/msg/xio/XioPortal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msg/xio/XioPortal.h b/src/msg/xio/XioPortal.h index efeaad7df881d..6c50c9cc8cb9c 100644 --- a/src/msg/xio/XioPortal.h +++ b/src/msg/xio/XioPortal.h @@ -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(xs)); continue; } /* switch (xs->type) */ - q_iter = send_q.erase(q_iter); + q_iter = send_q.erase(q_iter); } /* while */ } /* size > 0 */ -- 2.39.5