From 703a20a9bccb43da872a24f289b964edc108e9a3 Mon Sep 17 00:00:00 2001 From: "parallelbgls@outlook.com" Date: Wed, 28 Oct 2015 09:45:49 +0800 Subject: [PATCH] 2015-10-28 update 1 add stream flush --- Modbus.Net/ModBus.Net/TcpConnector.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Modbus.Net/ModBus.Net/TcpConnector.cs b/Modbus.Net/ModBus.Net/TcpConnector.cs index 40321b6..917487e 100644 --- a/Modbus.Net/ModBus.Net/TcpConnector.cs +++ b/Modbus.Net/ModBus.Net/TcpConnector.cs @@ -228,6 +228,7 @@ namespace ModBus.Net try { int len = await stream.ReadAsync(_receiveBuffer, 0, _receiveBuffer.Length); + stream.Flush(); // 异步接收回答 if (len > 0) {