mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
frontend/http: disambiguate NumWantProvided
This commit is contained in:
parent
ca823e0e5f
commit
1a0b5c56a6
1 changed files with 2 additions and 1 deletions
|
@ -88,8 +88,9 @@ func ParseAnnounce(r *http.Request, opts ParseOptions) (*bittorrent.AnnounceRequ
|
||||||
if err != nil && err != bittorrent.ErrKeyNotFound {
|
if err != nil && err != bittorrent.ErrKeyNotFound {
|
||||||
return nil, bittorrent.ClientError("failed to parse parameter: numwant")
|
return nil, bittorrent.ClientError("failed to parse parameter: numwant")
|
||||||
}
|
}
|
||||||
request.NumWant = uint32(numwant)
|
// If there were no errors, the user actually provided the numwant.
|
||||||
request.NumWantProvided = err == nil
|
request.NumWantProvided = err == nil
|
||||||
|
request.NumWant = uint32(numwant)
|
||||||
|
|
||||||
// Parse the port where the client is listening.
|
// Parse the port where the client is listening.
|
||||||
port, err := qp.Uint64("port")
|
port, err := qp.Uint64("port")
|
||||||
|
|
Loading…
Add table
Reference in a new issue