udp: remove unnecessary returns in switch stmt
This commit is contained in:
parent
093a748457
commit
c4706022d7
1 changed files with 2 additions and 6 deletions
|
@ -190,7 +190,6 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteConnectionID(w, txID, NewConnectionID(r.IP, time.Now(), t.PrivateKey))
|
WriteConnectionID(w, txID, NewConnectionID(r.IP, time.Now(), t.PrivateKey))
|
||||||
return
|
|
||||||
|
|
||||||
case announceActionID:
|
case announceActionID:
|
||||||
actionName = "announce"
|
actionName = "announce"
|
||||||
|
@ -213,8 +212,6 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string
|
||||||
|
|
||||||
go t.logic.AfterAnnounce(context.Background(), req, resp)
|
go t.logic.AfterAnnounce(context.Background(), req, resp)
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
case scrapeActionID:
|
case scrapeActionID:
|
||||||
actionName = "scrape"
|
actionName = "scrape"
|
||||||
|
|
||||||
|
@ -236,11 +233,10 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string
|
||||||
|
|
||||||
go t.logic.AfterScrape(context.Background(), req, resp)
|
go t.logic.AfterScrape(context.Background(), req, resp)
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
err = errUnknownAction
|
err = errUnknownAction
|
||||||
WriteError(w, txID, err)
|
WriteError(w, txID, err)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue