http: stopped throwing error on invalid event

Event is an optional key, and if it's invalid or non-existent then it can just be assumed as 'none'
This commit is contained in:
Josh de Kock 2016-03-29 23:18:58 +01:00
parent 0652aefcb5
commit 978c6a36e7

View file

@ -24,7 +24,7 @@ func announceRequest(r *http.Request, cfg *httpConfig) (*chihaya.AnnounceRequest
eventStr, err := q.String("event") eventStr, err := q.String("event")
if err != nil { if err != nil {
return nil, tracker.ClientError("failed to parse parameter: event") eventStr = "none"
} }
request.Event, err = event.New(eventStr) request.Event, err = event.New(eventStr)
if err != nil { if err != nil {