leech now correctly calls OnError when ext msg cannot be decoded
This commit is contained in:
parent
eea341407d
commit
c30f69d1e9
@ -335,7 +335,7 @@ func (l *Leech) Do(deadline time.Time) {
|
||||
rExtDict := new(extDict)
|
||||
err = bencode.NewDecoder(rMessageBuf).Decode(rExtDict)
|
||||
if err != nil {
|
||||
zap.L().Warn("Couldn't decode extension message in the loop!", zap.Error(err))
|
||||
l.OnError(errors.Wrap(err, "could not decode ext msg in the loop"))
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user