432901 ensure a single onError callback only in pending and unready states
This commit is contained in:
parent
87c5b30d1c
commit
eade9a3d25
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue