Merge pull request #110 from holisticode/nomockdep

p2p/simulations: removed requirement for a mocker from network
This commit is contained in:
Viktor Trón 2017-07-04 15:33:44 +02:00 committed by GitHub
commit a911f75421

View file

@ -321,7 +321,8 @@ func (s *Server) StartMocker(w http.ResponseWriter, req *http.Request) {
mockerid := req.Context().Value("mock").(string)
if len(s.Mockers) == 0 {
http.Error(w, "mocker not configured", http.StatusInternalServerError)
//don't require a mocker to be present
s.JSON(w, http.StatusNotModified, "No mocker configured")
return
}