Explorar o código

subnet/etcdv2: Fix panic from bad error contruction

Fixes #657
Tom Denham %!s(int64=8) %!d(string=hai) anos
pai
achega
5d733f0273
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      subnet/etcdv2/registry.go

+ 1 - 1
subnet/etcdv2/registry.go

@@ -397,7 +397,7 @@ func (esr *etcdSubnetRegistry) parseNetworkKey(s string) (string, bool) {
 func nodeToLease(node *etcd.Node) (*Lease, error) {
 	sn := ParseSubnetKey(node.Key)
 	if sn == nil {
-		return nil, fmt.Errorf("failed to parse subnet key %q", *sn)
+		return nil, fmt.Errorf("failed to parse subnet key %s", node.Key)
 	}
 
 	attrs := &LeaseAttrs{}