Unverified Commit f8a18bb2 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #91 from anacrolix/fix/missing-addr-protocol-name

Use the original protocol name for address missing errors
parents 73950681 6f524a43
......@@ -22,7 +22,8 @@ func stringToBytes(s string) ([]byte, error) {
sp = sp[1:]
for len(sp) > 0 {
p := ProtocolWithName(sp[0])
name := sp[0]
p := ProtocolWithName(name)
if p.Code == 0 {
return nil, fmt.Errorf("no protocol with name %s", sp[0])
}
......@@ -34,7 +35,7 @@ func stringToBytes(s string) ([]byte, error) {
}
if len(sp) < 1 {
return nil, fmt.Errorf("protocol requires address, none given: %s", p.Name)
return nil, fmt.Errorf("protocol requires address, none given: %s", name)
}
if p.Path {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment