432901 ensure a single onError callback only in pending and unready states

This commit is contained in:
Greg Wilkins 2014-04-25 18:23:54 +02:00
parent 87c5b30d1c
commit eade9a3d25
2 changed files with 3 additions and 2 deletions

View File

@ -755,7 +755,8 @@ public class HttpOutput extends ServletOutputStream implements Runnable
{
Throwable th=_onError;
_onError=null;
_writeListener.onError(new IOException(th));
LOG.debug("onError",th);
_writeListener.onError(th);
close();
break loop;

View File

@ -238,10 +238,10 @@ public class AsyncIOServletTest
@Override
public void onError(Throwable t)
{
Assert.assertSame(throwable, t);
latch.countDown();
response.setStatus(500);
asyncContext.complete();
Assert.assertSame(throwable, t);
}
});
}