Browse Source

Merge pull request #10582 from johncming/empty_update

clientv3/naming: ignore empty update.
Xiang Li 6 years ago
parent
commit
fc6936863a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      clientv3/naming/grpc.go

+ 2 - 0
clientv3/naming/grpc.go

@@ -98,6 +98,8 @@ func (gw *gRPCWatcher) Next() ([]*naming.Update, error) {
 		case etcd.EventTypeDelete:
 			err = json.Unmarshal(e.PrevKv.Value, &jupdate)
 			jupdate.Op = naming.Delete
+		default:
+			continue
 		}
 		if err == nil {
 			updates = append(updates, &jupdate)