Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-01-20 01:40:34 +0000
committerGreg Wilkins2012-01-20 01:40:34 +0000
commit8e69edaf9ec3343cf038a561fb54451c024cd13c (patch)
treee5ad05b90d7cb667ba05fc6751adc4be323be784
parent50e551de64f8a910f483270df1c16eccb4616f9a (diff)
downloadorg.eclipse.jetty.project-8e69edaf9ec3343cf038a561fb54451c024cd13c.tar.gz
org.eclipse.jetty.project-8e69edaf9ec3343cf038a561fb54451c024cd13c.tar.xz
org.eclipse.jetty.project-8e69edaf9ec3343cf038a561fb54451c024cd13c.zip
368992 avoid non-blocking flush when writing to avoid setting !_writable without _writeblocked
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java9
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java6
2 files changed, 4 insertions, 11 deletions
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
index ff95a454ed..ffbcc163e1 100644
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
@@ -457,14 +457,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
}
return true;
}
-
- /* ------------------------------------------------------------ */
- /* short cut for busyselectChannelServerTest */
- public void clearWritable()
- {
- _writable=false;
- }
-
+
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.io.AsyncEndPoint#scheduleWrite()
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
index 7f5d2628b4..12bf46b6d7 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
@@ -135,8 +135,8 @@ public class HttpOutput extends ServletOutputStream
// Add the _content
if (_generator.addContent((byte)b))
- // Buffers are full so flush.
- flush();
+ // Buffers are full so commit.
+ _connection.commitResponse(Generator.MORE);
if (_generator.isAllContentWritten())
{
@@ -174,7 +174,7 @@ public class HttpOutput extends ServletOutputStream
close();
}
else if (_generator.isBufferFull())
- flush();
+ _connection.commitResponse(Generator.MORE);
// Block until our buffer is free
while (buffer.length() > 0 && _generator.isOpen())

Back to the top