Skip to main content

[tyrus~code:659015b1] Servlet Container - skipping frames when writing

  • From:
  • To:
  • Subject: [tyrus~code:659015b1] Servlet Container - skipping frames when writing
  • Date: Mon, 5 Aug 2013 09:50:33 +0000

Project:    tyrus
Repository: code
Revision:   659015b131b49d548a311b7d9a28d000f262187c
Author:     jerseyrobot
Date:       2013-08-05 09:34:34 UTC
Link:       

Log Message:
------------
Servlet Container - skipping frames when writing



Revisions:
----------
659015b131b49d548a311b7d9a28d000f262187c


Modified Paths:
---------------
containers/servlet/src/main/java/org/glassfish/tyrus/servlet/ConnectionImpl.java


Diffs:
------
--- 
a/containers/servlet/src/main/java/org/glassfish/tyrus/servlet/ConnectionImpl.java
+++ 
b/containers/servlet/src/main/java/org/glassfish/tyrus/servlet/ConnectionImpl.java
@@ -100,10 +100,12 @@ class ConnectionImpl extends Connection implements 
WriteListener {
         QueuedFrame queuedFrame = queue.poll();
         isReady = servletOutputStream.isReady();
 
-        while (queuedFrame != null && isReady) {
+        while (isReady && queuedFrame != null) {
             _write(queuedFrame.dataFrame, queuedFrame.completionHandler);
             isReady = servletOutputStream.isReady();
-            queuedFrame = queue.poll();
+            if (isReady) {
+                queuedFrame = queue.poll();
+            }
         }
     }
 





[tyrus~code:659015b1] Servlet Container - skipping frames when writing

jerseyrobot 08/05/2013
 
 
Close
loading
Please Confirm
Close