From 12fb07c3c2d3362fc90e158ad0fac840c78ae8d5 Mon Sep 17 00:00:00 2001 From: Qingyang Hu Date: Mon, 12 Aug 2024 16:57:17 -0400 Subject: [PATCH] minor fix --- mongo/integration/mtest/mongotest.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mongo/integration/mtest/mongotest.go b/mongo/integration/mtest/mongotest.go index 7fd40890d3..70c0f0333d 100644 --- a/mongo/integration/mtest/mongotest.go +++ b/mongo/integration/mtest/mongotest.go @@ -616,9 +616,11 @@ func (t *T) ClearFailPoints() { if err != nil { t.Fatalf("error clearing fail point %s: %v", fp.name, err) } - if fp.client != t.Client { - _ = fp.client.Disconnect(context.Background()) - t.fpClients[fp.client] = false + t.fpClients[fp.client] = false + } + for client, active := range t.fpClients { + if !active && client != t.Client { + _ = client.Disconnect(context.Background()) } } t.failPoints = t.failPoints[:0]