We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 727518e + 4b3f368 commit c980019Copy full SHA for c980019
ModbusSlave/ModbusSlave.csproj
@@ -180,4 +180,4 @@
180
<Target Name="AfterBuild">
181
</Target>
182
-->
183
-</Project>
+</Project>
ModbusSlave/SlaveForm.cs
@@ -154,6 +154,13 @@ private void DoDisconnect()
154
_uart.Dispose();
155
_uart = null;
156
}
157
+
158
+ if (_socket != null)
159
+ {
160
+ _socket.Dispose();
161
+ _socket = null;
162
+ }
163
164
if (_thread != null && _thread.IsAlive)
165
{
166
if (_thread.Join(2000) == false)
@@ -162,11 +169,6 @@ private void DoDisconnect()
169
_thread = null;
170
171
- if (_socket != null)
- {
167
- _socket.Dispose();
168
- _socket = null;
- }
172
173
174
#endregion
0 commit comments