From cc4198971e08cc28c662589e90ed1a10a5be9ab4 Mon Sep 17 00:00:00 2001 From: cmcmaugh Date: Sat, 22 Feb 2014 13:04:11 +0000 Subject: [PATCH] Apply receive timeout to commPort when using RxtxChannel. Part of [#1390] --- .../src/main/java/io/netty/channel/rxtx/RxtxChannel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannel.java b/transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannel.java index f8371a0a32..8df3d10cc8 100644 --- a/transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannel.java +++ b/transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannel.java @@ -65,7 +65,7 @@ public class RxtxChannel extends OioByteStreamChannel { RxtxDeviceAddress remote = (RxtxDeviceAddress) remoteAddress; final CommPortIdentifier cpi = CommPortIdentifier.getPortIdentifier(remote.value()); final CommPort commPort = cpi.open(getClass().getName(), 1000); - + commPort.enableReceiveTimeout(config().getOption(READ_TIMEOUT)); deviceAddress = remote; serialPort = (SerialPort) commPort;