allowed requests to be attached until finally clause is reached
This commit is contained in:
parent
ac52a14efc
commit
9b0680e5d6
2 changed files with 9 additions and 12 deletions
|
@ -259,6 +259,7 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
|
|||
res.write ("Error in application: <b>" + x.getMessage () + "</b>");
|
||||
} finally {
|
||||
if (primaryRequest) {
|
||||
activeRequests.remove (req);
|
||||
releaseEvaluator (ev);
|
||||
res.close (); // this needs to be done before sending it back
|
||||
} else {
|
||||
|
|
|
@ -533,19 +533,15 @@ public class RequestEvaluator implements Runnable {
|
|||
this.user = user;
|
||||
this.res = new ResponseTrans ();
|
||||
|
||||
try {
|
||||
app.activeRequests.put (req, this);
|
||||
app.activeRequests.put (req, this);
|
||||
|
||||
checkThread ();
|
||||
wait (app.requestTimeout);
|
||||
if (reqtype != NONE) {
|
||||
IServer.getLogger().log ("Stopping Thread for Request "+app.getName()+"/"+req.path);
|
||||
stopThread ();
|
||||
res.reset ();
|
||||
res.write ("<b>Error in application '"+app.getName()+"':</b> <br><br><pre>Request timed out.</pre>");
|
||||
}
|
||||
} finally {
|
||||
app.activeRequests.remove (req);
|
||||
checkThread ();
|
||||
wait (app.requestTimeout);
|
||||
if (reqtype != NONE) {
|
||||
IServer.getLogger().log ("Stopping Thread for Request "+app.getName()+"/"+req.path);
|
||||
stopThread ();
|
||||
res.reset ();
|
||||
res.write ("<b>Error in application '"+app.getName()+"':</b> <br><br><pre>Request timed out.</pre>");
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Add table
Reference in a new issue