mirror of
https://github.com/go-i2p/go-i2p-bt.git
synced 2025-07-13 11:54:35 -04:00
fix the bug about marshaling the krpc error message
This commit is contained in:
@ -179,7 +179,7 @@ func (e Error) MarshalBencode() (ret []byte, err error) {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
buf.Grow(32)
|
||||
err = bencode.NewEncoder(buf).Encode([]interface{}{e.Code, e.Reason})
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
ret = buf.Bytes()
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user