On 04/06/2013 13:55, Violeta Georgieva wrote:
> 2013/5/31 Violeta Georgieva wrote:

>> Let's put this as plan B for now.
>>
>> I made a small change in the AsyncContextImpl.doInternalDispatch().
>>
>> Can you comment on the patch?
>>
>>
>> Index: C:/tc8.0.x/java/org/apache/catalina/core/AsyncContextImpl.java
>> ===================================================================
>> --- C:/tc8.0.x/java/org/apache/catalina/core/AsyncContextImpl.java
> (revision 1488110)
>> +++ C:/tc8.0.x/java/org/apache/catalina/core/AsyncContextImpl.java
> (working copy)
>> @@ -185,6 +185,10 @@
>>              logDebug("dispatch   ");
>>          }
>>          check();
>> +        if (dispatch != null) {
>> +            throw new IllegalStateException(
>> +                    sm.getString("asyncContextImpl.dispatchingStarted"));
>> +        }
>>          if (request.getAttribute(ASYNC_REQUEST_URI)==null) {
>>              request.setAttribute(ASYNC_REQUEST_URI,
> request.getRequestURI());
>>              request.setAttribute(ASYNC_CONTEXT_PATH,
> request.getContextPath());
>> @@ -347,7 +351,9 @@
>>              logDebug("intDispatch");
>>          }
>>          try {
>> -            dispatch.run();
>> +            Runnable runnable = dispatch;
>> +            dispatch = null;
>> +            runnable.run();
>>              if (!request.isAsync()) {
>>                  fireOnComplete();
>>              }
>>
>>
> 
> Can you comment?

Looks good to me.

> Any other suggestions?

Nope :)

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to