Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2013-07-01 09:34:57 +0000
committerThomas Becker2013-07-01 09:35:13 +0000
commitd2470f61709dc0a3f9a27eb116c97d55442a14ad (patch)
treec9e45dc90e13c9639c1e7ab5265f674a21ddd255 /jetty-spdy
parentd522bb4c19ecde0e071b36874ef9c755d6bb7472 (diff)
downloadorg.eclipse.jetty.project-d2470f61709dc0a3f9a27eb116c97d55442a14ad.tar.gz
org.eclipse.jetty.project-d2470f61709dc0a3f9a27eb116c97d55442a14ad.tar.xz
org.eclipse.jetty.project-d2470f61709dc0a3f9a27eb116c97d55442a14ad.zip
410805 StandardSession: remove all frameBytes for a given stream from queue if the stream is reset
Diffstat (limited to 'jetty-spdy')
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java
index 067f7f7e48..e50f98e1ab 100644
--- a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java
+++ b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java
@@ -218,11 +218,22 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
if (stream != null)
{
stream.process(frame);
+ removeFrameBytesFromQueue(stream);
removeStream(stream);
}
}
}
+ private void removeFrameBytesFromQueue(Stream stream)
+ {
+ synchronized (queue)
+ {
+ for (FrameBytes frameBytes : queue)
+ if (frameBytes.getStream() == stream)
+ queue.remove(frameBytes);
+ }
+ }
+
@Override
public void settings(SettingsInfo settingsInfo) throws ExecutionException, InterruptedException, TimeoutException
{
@@ -492,7 +503,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
private void onSyn(final SynStreamFrame frame)
{
- IStream stream = createStream(frame, null, false, new Promise.Adapter<Stream>(){
+ IStream stream = createStream(frame, null, false, new Promise.Adapter<Stream>()
+ {
@Override
public void failed(Throwable x)
{
@@ -1054,7 +1066,7 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
}
}
- private void append(FrameBytes frameBytes)
+ void append(FrameBytes frameBytes)
{
Throwable failure;
synchronized (queue)
@@ -1215,7 +1227,7 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
public abstract void fail(Throwable throwable);
}
- private abstract class AbstractFrameBytes implements FrameBytes, Runnable
+ abstract class AbstractFrameBytes implements FrameBytes, Runnable
{
private final IStream stream;
private final Callback callback;

Back to the top