dht quirk

This commit is contained in:
Alex Grintsvayg 2018-04-24 17:19:16 -04:00
parent ebc7373dc1
commit faa96e6a62

View file

@ -90,6 +90,8 @@ func (r Request) MarshalBencode() ([]byte, error) {
args = r.StoreArgs
} else if r.Arg != nil {
args = []Bitmap{*r.Arg}
} else {
args = []string{} // request must always have keys 0-4, so we use an empty list for PING
}
return bencode.EncodeBytes(map[string]interface{}{
headerTypeField: requestType,