no panic in the lib

This commit is contained in:
Miek Gieben 2011-08-08 10:29:30 +02:00
parent 64715cc563
commit 91fdd69c80
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ func (k *RR_DNSKEY) Read(q io.Reader) os.Error {
return err
}
if _, ok := r.(*RR_DNSKEY); !ok {
panic("did not read a DNSKEY")
return ErrKey
}
k.Hdr = r.(*RR_DNSKEY).Hdr
k.Flags = r.(*RR_DNSKEY).Flags