slight tweak to attachRequest()

This commit is contained in:
hns 2001-02-26 20:23:39 +00:00
parent 69d9b49ce3
commit ac52a14efc

View file

@ -556,10 +556,11 @@ public class RequestEvaluator implements Runnable {
* wait for it to complete. Otherwise return null, so the application knows it has to run the request. * wait for it to complete. Otherwise return null, so the application knows it has to run the request.
*/ */
public synchronized ResponseTrans attachRequest (RequestTrans req) throws InterruptedException { public synchronized ResponseTrans attachRequest (RequestTrans req) throws InterruptedException {
if (this.req == null || !this.req.equals (req) || reqtype == NONE) if (this.req == null || res == null || !this.req.equals (req))
return null; return null;
// we already know our response object // we already know our response object
ResponseTrans r = res; ResponseTrans r = res;
if (reqtype != NONE)
wait (app.requestTimeout); wait (app.requestTimeout);
return r; return r;
} }