Browse Source

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

Eugene Yakubovich 9 years ago
parent
commit
28603dc94d
1 changed files with 1 additions and 1 deletions
  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