Skip to content

Commit f37dd9b

Browse files
Merge pull request #8 from kamil-holubicki/DISTMYSQL-232
"WARNING: NamedStopwatch.Stop("instance") IsRunning is false"
2 parents e7b23d9 + 6f6dec8 commit f37dd9b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

go/inst/instance_dao.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,16 +380,15 @@ func ReadTopologyInstanceBufferable(instanceKey *InstanceKey, bufferWrites bool,
380380

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

394393
instance.Key = *instanceKey
395394

0 commit comments

Comments
 (0)