udp: Add basic UDP tests

This commit is contained in:
Justin Li
2015-02-21 14:35:21 -05:00
parent 105edf21f1
commit 7512f50731
6 changed files with 218 additions and 3 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ func (s *Server) stats(w http.ResponseWriter, r *http.Request, p httprouter.Para
func handleTorrentError(err error, w *Writer) (int, error) {
if err == nil {
return http.StatusOK, nil
} else if _, ok := err.(models.ClientError); ok {
} else if models.IsPublicError(err) {
w.WriteError(err)
stats.RecordEvent(stats.ClientError)
return http.StatusOK, nil