瀏覽代碼

bug fix: on error, index is in err obj, not response

Eugene Yakubovich 9 年之前
父節點
當前提交
28603dc94d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      subnet/etcd.go

+ 1 - 1
subnet/etcd.go

@@ -249,7 +249,7 @@ func (m *EtcdManager) getLeases(ctx context.Context, network string) ([]Lease, u
 
 	case err.(*etcd.EtcdError).ErrorCode == etcdKeyNotFound:
 		// key not found: treat it as empty set
-		index = resp.EtcdIndex
+		index = err.(*etcd.EtcdError).Index
 
 	default:
 		return nil, 0, err