Delete connstr in threadgdbm global channel map on close

This commit is contained in:
Carlosokumu 2024-10-17 12:32:31 +03:00
parent a51f739d06
commit 54cc33c819
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -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