Browse Source

修复拦截器抛出异常导致继续向下的BUG

xx 2 years ago
parent
commit
0c8ede7ceb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/net/http_router.cpp

+ 1 - 0
src/net/http_router.cpp

@@ -166,6 +166,7 @@ void ylib::network::http::router::__thread_callback(reqpack* rp)
         ylib::log->error("(interceptor)business processing exception:" + std::string(e.what()) + ", url:" + rp->filepath() + " ip:" + rp->request()->remote_ipaddress(true), "router");
 #endif
         rp->response()->send((std::string)e.what(), 500, "Internal Server Error");
+        return;
     }
     bool execed = false;
     for(size_t i=0;i<m_subscribe.m_count;i++){