yqmm666
yqmm666
drogon::app().loadConfigFile(path_server_root / "config.json"); drogon::app().setUploadPath(path_upload); if (run_as_daemon) { // drogon::app().setLogPath(path_log_files); drogon::app().enableRunAsDaemon(); } else Create_PidFile(path_server_root); 我发现当我的config.json文件中含有redis_clients的配置时,run_as_daemon后无法发送httpclient,当我删除config.json中的redis相关配置时一切正常。(实际我的程序中没有用到redis,配置中的redis描述是之前项目的残留) "redis_clients": [ { //name: Name of the client,'default' by default //"name":"", //host: Server IP, 127.0.0.1 by...
发送httpclient是在run_as_daemon之后,在我的server收到一个请求后,我要在这个请求中去httpclient给另外一个server。 并且关键是,我的项目规划确实需要redis。
`#include #include #include #ifdef __linux__ #include #include #endif using namespace drogon; int nth_resp = 0; int main(int argc, char const* argv[]) { bool run_as_daemon{ false }; if (argc == 2...