remove a code to finish job requests when winix exits
Actually there was a bug and the code was not correctly waiting for the job requests.
This commit is contained in:
@@ -934,33 +934,12 @@ void App::Start()
|
||||
fcgi_request = &cur.request->fcgi_request;
|
||||
}
|
||||
|
||||
WaitForRequestsToFinish();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* wait for requests from the jobs
|
||||
*/
|
||||
void App::WaitForRequestsToFinish()
|
||||
{
|
||||
bool is_req_tab_empty = false;
|
||||
|
||||
{
|
||||
Winix::Lock lock(synchro);
|
||||
system.DeleteOldRequests();
|
||||
is_req_tab_empty = system.req_tab.empty();
|
||||
}
|
||||
|
||||
while( is_req_tab_empty )
|
||||
{
|
||||
log << log3 << "App: waiting for requests to finish..." << logend << logsave;
|
||||
sleep(1);
|
||||
|
||||
{
|
||||
Winix::Lock lock(synchro);
|
||||
is_req_tab_empty = system.req_tab.empty();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* we do not wait for some job requests to finish (if there are such requests)
|
||||
* the job loop will exit immediately when a synchro->is_stop_signal is defined
|
||||
* and there is no need to process such requests (the www server will return a 50x error
|
||||
* to the client)
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user