Fixed infinite loop described in INT-3453.

This commit is contained in:
John Anderson
2014-06-24 16:35:42 +04:00
parent d51185d464
commit 05f5011654

View File

@@ -295,8 +295,16 @@ public class TcpNioConnection extends TcpConnectionSupport {
* @throws IOException
*/
private synchronized Message<?> convert() throws Exception {
if (!dataAvailable()) {
return null;
if (this.channelInputStream.available() <= 0) {
if (!writingToPipe) {
return null;
}
else {
Thread.sleep(5);
if (this.channelInputStream.available() <= 0) {
return null;
}
}
}
Message<?> message = null;
try {