handler: make client persistent
This commit is contained in:
@@ -82,6 +82,7 @@ int main(int argc, char** argv, char** envp) {
|
||||
opts.maxRequestSize(g_pConfig->m_config.max_request_size); // 150MB TODO: configurable
|
||||
endpoint->init(opts);
|
||||
auto handler = Pistache::Http::make_handler<CServerHandler>();
|
||||
handler->init();
|
||||
endpoint->setHandler(handler);
|
||||
|
||||
endpoint->serveThreaded();
|
||||
@@ -110,6 +111,7 @@ int main(int argc, char** argv, char** envp) {
|
||||
|
||||
Debug::log(LOG, "Shutting down, bye!");
|
||||
|
||||
handler->finish();
|
||||
endpoint->shutdown();
|
||||
endpoint = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user