changeset 98:16e023784917

protect both read calls with test for blocking
author Carl Byington <carl@five-ten-sg.com>
date Tue, 17 Jun 2014 11:35:01 -0700
parents e1c43d50f9d8
children eda03b809f48
files src/org/tn5250j/framework/tn5250/DataStreamProducer.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/DataStreamProducer.java	Mon Jun 16 17:15:49 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/DataStreamProducer.java	Tue Jun 17 11:35:01 2014 -0700
@@ -239,6 +239,7 @@
 
          if (negotiate) {
             // get the negotiation option
+            if (bin.available() == 0) buffer.testChanged();
             baosin.write(bin.read());
             vt.negotiate(rBytes);
 
@@ -355,4 +356,4 @@
 //            System.out.println(i + ">" + shit[i] + "< hex >" + Integer.toHexString((shit[i] & 0xff)));
 //      }
 
-}
\ No newline at end of file
+}