Delete connstr in threadgdbm global channel map on close

This commit is contained in:
lash
2024-10-01 00:18:54 +01:00
parent 1b2c6933e1
commit f267aa2b41
3 changed files with 29 additions and 23 deletions

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