From 66f1d239f8022d6f7ff096424a43b6fde2d04608 Mon Sep 17 00:00:00 2001 From: parallelbgls Date: Fri, 1 Aug 2014 14:02:44 +0800 Subject: [PATCH] 2014-08-01 update Change linker field --- NA200H/ModBus.Net/TCPProtocalLinker.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/NA200H/ModBus.Net/TCPProtocalLinker.cs b/NA200H/ModBus.Net/TCPProtocalLinker.cs index 8642de1..088469d 100644 --- a/NA200H/ModBus.Net/TCPProtocalLinker.cs +++ b/NA200H/ModBus.Net/TCPProtocalLinker.cs @@ -6,15 +6,12 @@ namespace ModBus.Net { public class TcpProtocalLinker : ProtocalLinker { - private static TcpSocket _socket; + private TcpSocket _socket; public TcpProtocalLinker() { - if (_socket == null) - { - _socket = new TcpSocket(ConfigurationManager.IP, int.Parse(ConfigurationManager.Port), false); - } + _socket = new TcpSocket(ConfigurationManager.IP, int.Parse(ConfigurationManager.Port), false); } public override byte[] SendReceive(byte[] content)