diff src/org/tn5250j/framework/tn5250/DataStreamProducer.java @ 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 8181cb01c64d
children eda03b809f48
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
+}