changeset 118:636b32ba06f9

8075361: [UART] uart.setReceivetimeout(0) ought to be handled properly Summary: Fixed case when receive timeout is zero Reviewed-by: snazarki Contributed-by: alexey.karaksin@oracle.com
author snazarki
date Wed, 18 Mar 2015 14:55:33 +0300
parents e91c5536f398
children dada06425261 133a8266a5ac
files src/share/classes/com/oracle/dio/uart/impl/UARTImpl.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/oracle/dio/uart/impl/UARTImpl.java	Thu Mar 12 18:02:41 2015 +0300
+++ b/src/share/classes/com/oracle/dio/uart/impl/UARTImpl.java	Wed Mar 18 14:55:33 2015 +0300
@@ -683,7 +683,7 @@
                                 if(inputTimeout == Integer.MAX_VALUE){
                                     //timeout disabled, wait forever or till the buffer is fullfilled
                                     synchReadLock.wait();
-                                }else{
+                                }else if (inputTimeout > 0) {
                                     synchReadLock.wait(inputTimeout);
                                 }
                             }catch(InterruptedException iE){