]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix "none" event for WebTorrent announces
authorMatt Joiner <anacrolix@gmail.com>
Wed, 30 Dec 2020 00:43:48 +0000 (11:43 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 30 Dec 2020 00:43:48 +0000 (11:43 +1100)
tracker/tracker.go

index 7f2a5b5024888550dbd1e78fed746a38cb2388fc..1b6d1412bb203fcf7e900de5661f8b228c70148c 100644 (file)
@@ -36,8 +36,8 @@ type AnnounceResponse struct {
 type AnnounceEvent int32
 
 func (e AnnounceEvent) String() string {
-       // See BEP 3, "event".
-       return []string{"empty", "completed", "started", "stopped"}[e]
+       // See BEP 3, "event", and https://github.com/anacrolix/torrent/issues/416#issuecomment-751427001.
+       return []string{"", "completed", "started", "stopped"}[e]
 }
 
 const (