Skip to content

Commit 0112878

Browse files
committed
- CS 104 Connection: only call CLOSED event when running set to false
1 parent 6ece46b commit 0112878

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

lib60870/CS104/Connection.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,8 @@ private void HandleConnection()
17141714
{
17151715
}
17161716

1717+
running = false;
1718+
17171719
socket.Close();
17181720

17191721
netStream.Dispose();
@@ -1747,6 +1749,10 @@ private void HandleConnection()
17471749
connecting = false;
17481750
}
17491751

1752+
/// <summary>
1753+
/// Gets a value indicating whether this <see cref="T:lib60870.CS104.Connection"/> is running(connected).
1754+
/// </summary>
1755+
/// <value><c>true</c> if is running/connected; otherwise, <c>false</c>.</value>
17501756
public bool IsRunning
17511757
{
17521758
get

lib60870/LibraryCommon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class LibraryCommon
1616
/// <summary>
1717
/// Library minor version number
1818
/// </summary>
19-
public const int VERSION_MINOR = 1;
19+
public const int VERSION_MINOR = 2;
2020

2121
/// <summary>
2222
/// Library patch number

lib60870/lib60870.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -31,6 +32,9 @@
3132
</PropertyGroup>
3233
<ItemGroup>
3334
<Reference Include="System" />
35+
<Reference Include="nunit.framework">
36+
<HintPath>..\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll</HintPath>
37+
</Reference>
3438
</ItemGroup>
3539
<ItemGroup>
3640
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -103,4 +107,7 @@
103107
<Folder Include="CS104\" />
104108
<Folder Include="LinkLayer\" />
105109
</ItemGroup>
110+
<ItemGroup>
111+
<None Include="packages.config" />
112+
</ItemGroup>
106113
</Project>

tests/lib60870-tests.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
<Reference Include="nunit.framework, Version=2.6.4.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
3535
<Package>nunit</Package>
3636
</Reference>
37-
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
38-
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
39-
</Reference>
4037
</ItemGroup>
4138
<ItemGroup>
4239
<Compile Include="Test.cs" />

0 commit comments

Comments
 (0)