Project

General

Profile

Proper way to close a child server just before creation

Added by José Luis Rey over 5 years ago

Hello, I need to close a server just before first call.

I'm using dedicated process, and I want to close the server just after the WApplication has been created (it is for a server monitoring service, so I want to free resources a.s.a.p).

On my tests, if I call quit() or server->stop() on the constructor the request will not finish propertly, even if I do it in a working thread , I get persistent growing TCP TIME_WAIT connections (the socket didn't close propertly).

Any advice for do this task?

Kr


Replies (1)

RE: Proper way to close a child server just before creation - Added by lm at over 5 years ago

You're wanting the Wt::WApplication to serve its home page then destroy the Wt::WApplication object immediately? If the Wt::WApplication is destroyed immediately, it can't respond to any events: any mouse events, typing, button presses, page changes, etc., etc. If you're wanting to serve a static webpage, maybe look into Apache HTTPD? Wt is designed as a single-page, responsive-user-interface framework, and works well as such.

    (1-1/1)