Return if duplicate connect

This commit is contained in:
lash 2024-09-22 03:09:53 +01:00
parent 1cc2f58ab3
commit a455cfb854
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

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