Skip to content

Commit ab15988

Browse files
authored
Merge pull request #5 from percona/DISTMYSQL-182
Implementing the small FR DISTMYSQL-182 as also suggested by customer…
2 parents a48d8b2 + 10e1c2e commit ab15988

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

go/inst/instance_dao.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,14 @@ func ReadTopologyInstanceBufferable(instanceKey *InstanceKey, bufferWrites bool,
380380

381381
latency.Start("instance")
382382
db, err := db.OpenDiscovery(instanceKey.Hostname, instanceKey.Port)
383-
latency.Stop("instance")
384-
if err != nil {
383+
if err == nil {
384+
err = db.Ping()
385+
latency.Stop("instance")
386+
if err != nil {
387+
goto Cleanup
388+
}
389+
} else {
390+
latency.Stop("instance")
385391
goto Cleanup
386392
}
387393

0 commit comments

Comments
 (0)