This commit is contained in:
crusader 2018-04-06 12:24:50 +09:00
parent 8422254849
commit a0b05817ef

View File

@ -139,10 +139,12 @@ func (s *Server) httpHandler(ctx *fasthttp.RequestCtx) {
) )
if servlet = s.ServerHandler.(ServerHandler).Servlet(s.ctx, ctx); nil == servlet { if servlet = s.ServerHandler.(ServerHandler).Servlet(s.ctx, ctx); nil == servlet {
s.onError(ctx, fasthttp.StatusInternalServerError, err) s.onError(ctx, fasthttp.StatusNotFound, err)
return return
} }
servletCtx := servlet.ServletCtx(s.ctx)
go servlet.Handle(servletCtx, ctx)
} }
func (s *Server) onError(ctx *fasthttp.RequestCtx, status int, reason error) { func (s *Server) onError(ctx *fasthttp.RequestCtx, status int, reason error) {