Fixes #1703 - Improve HttpInput failure logging.
This commit is contained in:
parent
b616249603
commit
a2b78f1be2
|
@ -626,9 +626,20 @@ public class HttpInput extends ServletInputStream implements Runnable
|
||||||
synchronized (_inputQ)
|
synchronized (_inputQ)
|
||||||
{
|
{
|
||||||
if (_state instanceof ErrorState)
|
if (_state instanceof ErrorState)
|
||||||
LOG.warn(x);
|
{
|
||||||
|
// Log both the original and current failure
|
||||||
|
// without modifying the original failure.
|
||||||
|
Throwable failure = new Throwable(((ErrorState)_state).getError());
|
||||||
|
failure.addSuppressed(x);
|
||||||
|
LOG.warn(failure);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// Add a suppressed throwable to capture this stack
|
||||||
|
// trace without wrapping/hiding the original failure.
|
||||||
|
x.addSuppressed(new Throwable("HttpInput failure"));
|
||||||
_state = new ErrorState(x);
|
_state = new ErrorState(x);
|
||||||
|
}
|
||||||
|
|
||||||
if (_listener == null)
|
if (_listener == null)
|
||||||
_inputQ.notify();
|
_inputQ.notify();
|
||||||
|
|
Loading…
Reference in New Issue