From 9392fbeb591a6aa66f8f2209be75d51aedd1592c Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Mon, 23 Nov 2015 14:38:40 +0200 Subject: [PATCH] rpc: not stop client in error state Client in error state are already closed on in process to be closed. --- rpc/rpc.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/rpc.hh b/rpc/rpc.hh index 3f96a21f3..6247f4d01 100644 --- a/rpc/rpc.hh +++ b/rpc/rpc.hh @@ -190,8 +190,8 @@ public: } future<> stop() { - this->_error = true; - if (_connected) { + if (_connected && !this->_error) { + this->_error = true; return connection::stop(); } else { // connection::stop will fail on shutdown(); since we can't shutdown a