From e1f3ab78f196b5d81da403ab1fb7e7eb05b94c11 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Mon, 7 Oct 2024 23:33:09 +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