From 54cc33c8197ef6e42dc2d7ac4c16caac800e746b Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Thu, 17 Oct 2024 12:32:31 +0300 Subject: [PATCH] Delete connstr in threadgdbm global channel map on close --- internal/storage/gdbm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/storage/gdbm.go b/internal/storage/gdbm.go index eb959cf..49de570 100644 --- a/internal/storage/gdbm.go +++ b/internal/storage/gdbm.go @@ -109,6 +109,7 @@ func(tdb *ThreadGdbmDb) Get(ctx context.Context, key []byte) ([]byte, error) { func(tdb *ThreadGdbmDb) Close() error { tdb.reserve() close(dbC[tdb.connStr]) + delete(dbC, tdb.connStr) err := tdb.db.Close() tdb.db = nil return err