fix empty panic (#652)

pull/654/head
Tony 4 years ago committed by GitHub
parent f831dc0b55
commit 221467c8f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkg/naming/discovery/discovery.go

@ -278,6 +278,9 @@ func (r *Resolve) Fetch(ctx context.Context) (ins *naming.InstancesInfo, ok bool
if ok {
var appIns *naming.InstancesInfo
appIns, ok = app.zoneIns.Load().(*naming.InstancesInfo)
if !ok {
return
}
ins = new(naming.InstancesInfo)
ins.LastTs = appIns.LastTs
ins.Scheduler = appIns.Scheduler

Loading…
Cancel
Save