From: Haomai Wang Date: Sun, 3 Jul 2016 15:11:35 +0000 (+0800) Subject: msg/async: hold lock avoid state changing X-Git-Tag: ses5-milestone5~429^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=97e6850855ffb8057e4746e724bc60c746a4fd4f;p=ceph.git msg/async: hold lock avoid state changing Fixes: http://tracker.ceph.com/issues/16554 Signed-off-by: Haomai Wang --- diff --git a/src/msg/async/AsyncConnection.h b/src/msg/async/AsyncConnection.h index 29854e41144..5d81afc8264 100644 --- a/src/msg/async/AsyncConnection.h +++ b/src/msg/async/AsyncConnection.h @@ -395,8 +395,8 @@ class AsyncConnection : public Connection { void stop(bool queue_reset) { lock.Lock(); bool need_queue_reset = (state != STATE_CLOSED) && queue_reset; + _stop(); lock.Unlock(); - mark_down(); if (need_queue_reset) dispatch_queue->queue_reset(this); }