mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
Merge pull request #31929 from majianpeng/msg-async-bugfix
msg/async: update refcount and perf counter properly Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
b59cc672a0
@ -201,6 +201,7 @@ void Processor::accept()
|
||||
accept_error_num = 0;
|
||||
continue;
|
||||
} else {
|
||||
--w->references;
|
||||
if (r == -EINTR) {
|
||||
continue;
|
||||
} else if (r == -EAGAIN) {
|
||||
|
@ -397,7 +397,7 @@ public:
|
||||
*/
|
||||
void unregister_conn(const AsyncConnectionRef& conn) {
|
||||
std::lock_guard l{deleted_lock};
|
||||
if (!accepting_conns.count(conn))
|
||||
if (!accepting_conns.count(conn) || anon_conns.count(conn))
|
||||
conn->get_perf_counter()->dec(l_msgr_active_connections);
|
||||
deleted_conns.emplace(std::move(conn));
|
||||
conn->unregister();
|
||||
|
Loading…
Reference in New Issue
Block a user