Apply receive timeout to commPort when using RxtxChannel. Part of [#1390]

This commit is contained in:
cmcmaugh 2014-02-22 13:04:11 +00:00 committed by Norman Maurer
parent c538fd5098
commit d21197e0fc

View File

@ -65,7 +65,7 @@ public class RxtxChannel extends OioByteStreamChannel {
RxtxDeviceAddress remote = (RxtxDeviceAddress) remoteAddress; RxtxDeviceAddress remote = (RxtxDeviceAddress) remoteAddress;
final CommPortIdentifier cpi = CommPortIdentifier.getPortIdentifier(remote.value()); final CommPortIdentifier cpi = CommPortIdentifier.getPortIdentifier(remote.value());
final CommPort commPort = cpi.open(getClass().getName(), 1000); final CommPort commPort = cpi.open(getClass().getName(), 1000);
commPort.enableReceiveTimeout(config().getOption(READ_TIMEOUT));
deviceAddress = remote; deviceAddress = remote;
serialPort = (SerialPort) commPort; serialPort = (SerialPort) commPort;