From a455cfb854ccee0407804ae2f8bda3814b42f893 Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 22 Sep 2024 03:09:53 +0100 Subject: [PATCH] Return if duplicate connect --- internal/storage/gdbm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/storage/gdbm.go b/internal/storage/gdbm.go index 5b6867c..7646159 100644 --- a/internal/storage/gdbm.go +++ b/internal/storage/gdbm.go @@ -30,6 +30,7 @@ func(tdb *ThreadGdbmDb) Connect(ctx context.Context, connStr string) error { _, ok = dbC[connStr] if ok { logg.WarnCtxf(ctx, "already registered thread gdbm, skipping", "connStr", connStr) + return nil } gdb := gdbmdb.NewGdbmDb() err := gdb.Connect(ctx, connStr)