# HG changeset patch # User Carl Byington # Date 1403030101 25200 # Node ID 16e023784917df12992af690d0df518f4ca8458b # Parent e1c43d50f9d87c0e0f66ddf1ece3653a5ad5cd17 protect both read calls with test for blocking diff -r e1c43d50f9d8 -r 16e023784917 src/org/tn5250j/framework/tn5250/DataStreamProducer.java --- 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 +}