Improved changes introduced by a746d78.

This commit is contained in:
Simone Bordet 2014-06-26 10:08:13 +02:00
parent 02271b29f5
commit f2f19ee3ba
7 changed files with 10 additions and 12 deletions

View File

@ -776,7 +776,6 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
public void onCompleteFailure(Throwable failure)
{
content.failed(failure);
super.failed(failure);
anyToFailure(failure);
}

View File

@ -111,8 +111,6 @@ public class Flusher
break;
result.failed(x);
}
super.failed(x);
}
}

View File

@ -261,7 +261,6 @@ public class Flusher
// Notify outside the synchronized block.
for (StandardSession.FrameBytes frame : failed)
frame.failed(x);
super.failed(x);
}
}
}

View File

@ -394,7 +394,9 @@ public class ExtensionStack extends ContainerLifeCycle implements IncomingFrames
@Override
protected void onCompleteFailure(Throwable x)
{
// TODO This IteratingCallback never completes???
// This IteratingCallback never fails.
// The callback are those provided by WriteCallback (implemented
// below) and even in case of writeFailed() we call succeeded().
}
@Override

View File

@ -376,7 +376,10 @@ public abstract class CompressExtension extends AbstractExtension
@Override
protected void onCompleteFailure(Throwable x)
{
// TODO This IteratingCallback never completes???
// Fail all the frames in the queue.
FrameEntry entry;
while ((entry = entries.poll()) != null)
notifyCallbackFailure(entry.callback, x);
}
@Override
@ -394,10 +397,6 @@ public abstract class CompressExtension extends AbstractExtension
// If something went wrong, very likely the compression context
// will be invalid, so we need to fail this IteratingCallback.
failed(x);
// Now no more frames can be queued, fail those in the queue.
FrameEntry entry;
while ((entry = entries.poll()) != null)
notifyCallbackFailure(entry.callback, x);
}
}
}

View File

@ -158,7 +158,9 @@ public class FragmentExtension extends AbstractExtension
@Override
protected void onCompleteFailure(Throwable x)
{
// TODO This IteratingCallback never completes???
// This IteratingCallback never fails.
// The callback are those provided by WriteCallback (implemented
// below) and even in case of writeFailed() we call succeeded().
}
@Override

View File

@ -105,7 +105,6 @@ public class FrameFlusher
entry.release();
}
entries.clear();
super.failed(x);
failure = x;
onFailure(x);
}