Skip to content

Commit

Permalink
修正Remoting的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Sep 8, 2023
1 parent 782fd64 commit 7becd1b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 23 deletions.
4 changes: 2 additions & 2 deletions ClientTest/ClientTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NewLife.Redis" Version="5.5.2023.828-beta1607" />
<PackageReference Include="NewLife.UnitTest" Version="1.0.2023.718" />
<PackageReference Include="NewLife.UnitTest" Version="1.0.2023.905" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion Stardust.ServerTests/Stardust.ServerTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
Expand Down
10 changes: 0 additions & 10 deletions Stardust/LocalStarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,6 @@ public static IEnumerable<AgentInfo> Scan(AgentInfo local = null, Int32 timeout
var rs = new DefaultMessage();
IPEndPoint ep = null;
buf = udp.Receive(ref ep);
#if NET40
if (buf != null && rs.Read(buf) && encoder.Decode(rs, out var action, out _, out var data))
{
var js = encoder.DecodeResult(action, data, rs);
var info = (AgentInfo)encoder.Convert(js, typeof(AgentInfo));

yield return info;
}
#else
if (buf != null && rs.Read(buf))
{
var msg = encoder.Decode(rs);
Expand All @@ -467,7 +458,6 @@ public static IEnumerable<AgentInfo> Scan(AgentInfo local = null, Int32 timeout
yield return info;
}
}
#endif
}
}
#endregion
Expand Down
4 changes: 0 additions & 4 deletions Stardust/Models/AppInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,7 @@ public void Refresh()
try
{
// 调用WindowApi获取进程的连接数
#if NET40
var tcps = NetHelper.GetAllTcpConnections();
#else
var tcps = NetHelper.GetAllTcpConnections(-1);
#endif
if (tcps != null && tcps.Length > 0)
{
Connections = tcps.Count(e => e.ProcessId == Id);
Expand Down
2 changes: 0 additions & 2 deletions Stardust/StarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,7 @@ public NodeInfo GetNodeInfo()
DriveInfo = drives.Join(",", e => $"{e.Name}[{e.DriveFormat}]={e.AvailableFreeSpace.ToGMK()}/{e.TotalSize.ToGMK()}"),

Product = mi.Product,
#if !NET40
Vendor = mi.Vendor,
#endif
Processor = mi.Processor,
CpuRate = mi.CpuRate,
UUID = mi.UUID,
Expand Down
6 changes: 3 additions & 3 deletions Stardust/Stardust.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'!='net40'">
<PackageReference Include="NewLife.Core" Version="10.5.2023.903-beta0058" />
<PackageReference Include="NewLife.Remoting" Version="2.3.2023.902-beta1701" />
<PackageReference Include="NewLife.Core" Version="10.5.2023.903" />
<PackageReference Include="NewLife.Remoting" Version="2.3.2023.907" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net40'">
<PackageReference Include="NewLife.Core" Version="10.5.2023.801-net40" />
<PackageReference Include="NewLife.Core" Version="10.5.2023.904-net40" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NewLife.Core" Version="10.5.2023.903-beta0058" />
<PackageReference Include="NewLife.Core" Version="10.5.2023.906-beta0624" />
<PackageReference Include="SSH.NET" Version="2020.0.2" />
</ItemGroup>

Expand Down

0 comments on commit 7becd1b

Please sign in to comment.