2015-10-28 update 1 add stream flush

This commit is contained in:
parallelbgls@outlook.com
2015-10-28 09:45:49 +08:00
parent 13f13ffe4d
commit 703a20a9bc

View File

@@ -228,6 +228,7 @@ namespace ModBus.Net
try try
{ {
int len = await stream.ReadAsync(_receiveBuffer, 0, _receiveBuffer.Length); int len = await stream.ReadAsync(_receiveBuffer, 0, _receiveBuffer.Length);
stream.Flush();
// 异步接收回答 // 异步接收回答
if (len > 0) if (len > 0)
{ {