diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index 3456398899..4c3f723736 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -3762,10 +3762,10 @@ void storage_proxy::on_down(const gms::inet_address& endpoint) { future<> storage_proxy::drain_on_shutdown() { return do_with(::shared_ptr(), [this] (::shared_ptr& intrusive_list_guard) { return do_for_each(*_view_update_handlers_list, [this, &intrusive_list_guard] (abstract_write_response_handler& handler) { - if (_response_handlers.find(handler.id()) != _response_handlers.end()) { - intrusive_list_guard = handler.shared_from_this(); - handler.timeout_cb(); - } + if (_response_handlers.find(handler.id()) != _response_handlers.end()) { + intrusive_list_guard = handler.shared_from_this(); + handler.timeout_cb(); + } }); }).then([this] { return _hints_resource_manager.stop();