aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-11-30 07:54:55 (EST)
committerThomas Becker2012-11-30 07:55:09 (EST)
commitefc1a3e98f62b64c03dcc17ec351f00970a76c6c (patch)
treedf88e618a4e1ab59520c2fcf6cd6d0518a0d0451
parentb3e11143138401af2309eeb5e56ee52a21490590 (diff)
downloadorg.eclipse.jetty.project-efc1a3e98f62b64c03dcc17ec351f00970a76c6c.zip
org.eclipse.jetty.project-efc1a3e98f62b64c03dcc17ec351f00970a76c6c.tar.gz
org.eclipse.jetty.project-efc1a3e98f62b64c03dcc17ec351f00970a76c6c.tar.bz2
Fix javadoc in Stream.java and logging if a Stream is committed twice
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java3
-rw-r--r--jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java13
2 files changed, 8 insertions, 8 deletions
diff --git a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java
index 62fe356..472aa55 100644
--- a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java
+++ b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java
@@ -97,7 +97,7 @@ public interface Stream
*
* @param synInfo the metadata to send on stream creation
* @return a future containing the stream once it got established
- * @see #syn(SynInfo, long, TimeUnit, Callback)
+ * @see #syn(SynInfo, long, TimeUnit, Promise)
*/
public Future<Stream> syn(SynInfo synInfo);
@@ -159,7 +159,6 @@ public interface Stream
* @param dataInfo the metadata to send
* @param timeout the operation's timeout
* @param unit the timeout's unit
- * @param context the context passed to the callback
* @param callback the completion callback that gets notified of data sent
* @see #data(DataInfo)
*/
diff --git a/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java
index 67fd39d..b426b39 100644
--- a/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java
+++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpTransportOverSPDY.java
@@ -82,11 +82,10 @@ public class HttpTransportOverSPDY implements HttpTransport
{
EofException exception = new EofException("stream closed");
callback.failed(exception);
- LOG.warn("Committed response twice.", exception);
return;
}
// new Throwable().printStackTrace();
-
+
// info==null content==null lastContent==false should not happen
// info==null content==null lastContent==true signals no more content - complete
// info==null content!=null lastContent==false send data on committed response
@@ -95,14 +94,16 @@ public class HttpTransportOverSPDY implements HttpTransport
// info!=null content==null lastContent==true reply, commit and complete
// info!=null content!=null lastContent==false reply, commit with content
// info!=null content!=null lastContent==true reply, commit with content and complete
-
+
boolean hasContent = BufferUtil.hasContent(content);
-
+
if (info!=null)
{
if(!committed.compareAndSet(false, true)){
- callback.failed(new StreamException(stream.getId(), StreamStatus.PROTOCOL_ERROR,
- "Stream already committed!"));
+ StreamException exception = new StreamException(stream.getId(), StreamStatus.PROTOCOL_ERROR,
+ "Stream already committed!");
+ callback.failed(exception);
+ LOG.warn("Committed response twice.", exception);
return;
}
short version = stream.getSession().getVersion();