From 224238cb89f0e51bb89914ae2ea5ab71f7a7d0b1 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 30 Nov 2024 13:24:29 +0900 Subject: [PATCH] fixed ridiculous flaw --- client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 00beb09..8d15d9f 100644 --- a/client.go +++ b/client.go @@ -857,10 +857,8 @@ func (c *Client) RemoveClientConnById(conn_id uint32) error { c.cts_mtx.Unlock() return fmt.Errorf("non-existent connection id - %d", conn_id) } - if cts != cts { - c.cts_mtx.Unlock() - return fmt.Errorf("non-existent connection id - %d", conn_id) - } + + // NOTE: removal by id doesn't perform identity check delete(c.cts_map, cts.cfg.ServerAddr) delete(c.cts_map_by_id, cts.id)