Polish
This commit is contained in:
parent
e8d2c6c74b
commit
b93579a43e
|
@ -163,11 +163,11 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
|
|||
}
|
||||
|
||||
/**
|
||||
* Invoked when an error happens while writing. Defaults to no-op.
|
||||
* Servlet 3.1 based implementations will receive
|
||||
* {@link WriteListener#onError(Throwable)} event.
|
||||
* Invoked when an error happens while writing.
|
||||
* <p>Defaults to no-op. Servlet 3.1 based implementations will receive
|
||||
* {@code javax.servlet.WriteListener#onError(Throwable)} event.
|
||||
*/
|
||||
protected void writingFailed(Throwable t) {
|
||||
protected void writingFailed(Throwable ex) {
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -192,9 +192,10 @@ public class ServletServerHttpResponse extends AbstractListenerServerHttpRespons
|
|||
}
|
||||
|
||||
void handleError(Throwable ex) {
|
||||
if (bodyFlushProcessor != null) {
|
||||
bodyFlushProcessor.cancel();
|
||||
bodyFlushProcessor.onError(ex);
|
||||
ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor;
|
||||
if (flushProcessor != null) {
|
||||
flushProcessor.cancel();
|
||||
flushProcessor.onError(ex);
|
||||
}
|
||||
|
||||
ResponseBodyProcessor processor = bodyProcessor;
|
||||
|
@ -206,9 +207,10 @@ public class ServletServerHttpResponse extends AbstractListenerServerHttpRespons
|
|||
|
||||
@Override
|
||||
public void onComplete(AsyncEvent event) {
|
||||
if (bodyFlushProcessor != null) {
|
||||
bodyFlushProcessor.cancel();
|
||||
bodyFlushProcessor.onComplete();
|
||||
ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor;
|
||||
if (flushProcessor != null) {
|
||||
flushProcessor.cancel();
|
||||
flushProcessor.onComplete();
|
||||
}
|
||||
|
||||
ResponseBodyProcessor processor = bodyProcessor;
|
||||
|
|
|
@ -231,9 +231,9 @@ public class UndertowServerHttpResponse extends AbstractListenerServerHttpRespon
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void writingFailed(Throwable t) {
|
||||
protected void writingFailed(Throwable ex) {
|
||||
cancel();
|
||||
onError(t);
|
||||
onError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue