diff src/org/tn5250j/framework/tn5250/tnvt.java @ 214:3e68cb17c0b6

socket runs dry sends flag to tnvt to call testChanged()
author Carl Byington <carl@five-ten-sg.com>
date Mon, 07 Jul 2014 15:09:22 -0700
parents 6eab98e58bed
children 2d93d5063e3d
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/tnvt.java	Mon Jul 07 12:36:01 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/tnvt.java	Mon Jul 07 15:09:22 2014 -0700
@@ -982,11 +982,10 @@
 
         while (keepTrucking) {
             try {
-                Object e = dsq.poll(0L, TimeUnit.SECONDS);
-
-                if (e == null) {
+                Object e = dsq.take();
+
+                if ((e instanceof Integer) && ((Integer)e == 0)) {
                     buffer.testChanged();
-                    e = dsq.take();
                 };
 
                 bk.initialize((byte[])e);