From e7ce7c519fc47a04ca77516a1c315e8073cb65d5 Mon Sep 17 00:00:00 2001 From: Bill Gallagher Date: Fri, 15 Apr 2016 11:51:14 -0400 Subject: [PATCH] reset server.abended state after successful isMaster call https://github.com/go-mgo/mgo/issues/254 --- cluster.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cluster.go b/cluster.go index e28af5b45..6ffdfbfde 100644 --- a/cluster.go +++ b/cluster.go @@ -643,6 +643,10 @@ func (cluster *mongoCluster) AcquireSocket(mode Mode, slaveOk bool, syncTimeout cluster.syncServers() time.Sleep(100 * time.Millisecond) continue + } else { + server.Lock() + server.abended = false + server.Unlock() } } return s, nil