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.
|
* Invoked when an error happens while writing.
|
||||||
* Servlet 3.1 based implementations will receive
|
* <p>Defaults to no-op. Servlet 3.1 based implementations will receive
|
||||||
* {@link WriteListener#onError(Throwable)} event.
|
* {@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) {
|
void handleError(Throwable ex) {
|
||||||
if (bodyFlushProcessor != null) {
|
ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor;
|
||||||
bodyFlushProcessor.cancel();
|
if (flushProcessor != null) {
|
||||||
bodyFlushProcessor.onError(ex);
|
flushProcessor.cancel();
|
||||||
|
flushProcessor.onError(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResponseBodyProcessor processor = bodyProcessor;
|
ResponseBodyProcessor processor = bodyProcessor;
|
||||||
|
@ -206,9 +207,10 @@ public class ServletServerHttpResponse extends AbstractListenerServerHttpRespons
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete(AsyncEvent event) {
|
public void onComplete(AsyncEvent event) {
|
||||||
if (bodyFlushProcessor != null) {
|
ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor;
|
||||||
bodyFlushProcessor.cancel();
|
if (flushProcessor != null) {
|
||||||
bodyFlushProcessor.onComplete();
|
flushProcessor.cancel();
|
||||||
|
flushProcessor.onComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
ResponseBodyProcessor processor = bodyProcessor;
|
ResponseBodyProcessor processor = bodyProcessor;
|
||||||
|
|
|
@ -231,9 +231,9 @@ public class UndertowServerHttpResponse extends AbstractListenerServerHttpRespon
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void writingFailed(Throwable t) {
|
protected void writingFailed(Throwable ex) {
|
||||||
cancel();
|
cancel();
|
||||||
onError(t);
|
onError(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue