From: Justin M <37273682+DigitalAlchemist@users.noreply.github.com> Date: Mon, 4 Jan 2021 22:54:07 +0000 (+0000) Subject: Align webtorrent tracker to BEP-3 X-Git-Tag: v1.21.0~10 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ae9d5bce18fa57034ee73f1e3a45108176f67648;p=btrtrc.git Align webtorrent tracker to BEP-3 Adding "omitempty" to json marshalling, bringing the webtorrent tracker AnnounceRequest in line with BEP-3, which states omitting the the "event" field is acceptable. --- diff --git a/webtorrent/tracker_protocol.go b/webtorrent/tracker_protocol.go index 167044a6..a63fe5a6 100644 --- a/webtorrent/tracker_protocol.go +++ b/webtorrent/tracker_protocol.go @@ -12,7 +12,7 @@ type AnnounceRequest struct { Uploaded int64 `json:"uploaded"` Downloaded int64 `json:"downloaded"` Left int64 `json:"left"` - Event string `json:"event"` + Event string `json:"event,omitempty"` Action string `json:"action"` InfoHash string `json:"info_hash"` PeerID string `json:"peer_id"`