Skip to content

Commit

Permalink
v2.9.2024.0202
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Feb 2, 2024
1 parent d51676b commit d7b93bf
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 28 deletions.
13 changes: 0 additions & 13 deletions StarAgent/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System.Diagnostics;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Reflection;
using NewLife;
using NewLife.Agent;
using NewLife.Log;
using NewLife.Model;
using NewLife.Net;
using NewLife.Reflection;
using NewLife.Remoting;
using NewLife.Serialization;
Expand Down Expand Up @@ -363,9 +360,7 @@ public void StartLocalServer(Int32 port)
// 必须支持Udp,因为需要支持局域网广播搜索功能
var svr = new ApiServer(port)
{
#if !NET40
ReuseAddress = true,
#endif
Tracer = _factory?.Tracer,
Log = XTrace.Log,
EncoderLog = XTrace.Log,
Expand All @@ -381,14 +376,6 @@ public void StartLocalServer(Int32 port)
Log = XTrace.Log
}, null);

//svr.EnsureCreate();
//if (svr.Server is NetServer ns)
//{
// // 升级核心库以后不需要反射
// //ns.ReuseAddress = true;
// ns.SetValue("ReuseAddress", true);
//}

_server = svr;
svr.Start();
}
Expand Down
5 changes: 0 additions & 5 deletions Stardust/LocalStarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,7 @@ public static Task ProbeAsync(String? url = null, String? version = null, String
var msg = encoder.Decode(rs);
if (msg != null)
{
#if NET40
var js = encoder.DecodeResult(msg.Action, msg.Data, rs);
var info = (AgentInfo)encoder.Convert(js, typeof(AgentInfo));
#else
var info = (AgentInfo?)encoder.DecodeResult(msg.Action, msg.Data, rs, typeof(AgentInfo));

Check warning on line 485 in Stardust/LocalStarClient.cs

View workflow job for this annotation

GitHub Actions / build-publish

Possible null reference argument for parameter 'data' in 'object? JsonEncoder.DecodeResult(string action, Packet data, IMessage msg, Type returnType)'.
#endif

yield return info;
}
Expand Down
4 changes: 0 additions & 4 deletions Stardust/StarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,8 @@ protected override void Dispose(Boolean disposing)
/// <param name="onRequest"></param>
/// <param name="cancellationToken">取消通知</param>
/// <returns></returns>
#if NET40
public override async Task<TResult> InvokeAsync<TResult>(HttpMethod method, String action, Object? args = null, Action<HttpRequestMessage>? onRequest = null, CancellationToken cancellationToken = default)
#else
[return: MaybeNull]
public override async Task<TResult> InvokeAsync<TResult>(HttpMethod method, String action, Object? args = null, Action<HttpRequestMessage>? onRequest = null, CancellationToken cancellationToken = default)

Check warning on line 117 in Stardust/StarClient.cs

View workflow job for this annotation

GitHub Actions / build-publish

Nullability of reference types in return type doesn't match overridden member.

Check warning on line 117 in Stardust/StarClient.cs

View workflow job for this annotation

GitHub Actions / build-publish

Nullability of reference types in return type doesn't match overridden member.
#endif
{
var needLogin = !Logined && !action.EqualIgnoreCase("Node/Login", "Node/Logout");
if (needLogin)
Expand Down
2 changes: 0 additions & 2 deletions Stardust/StarFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ private void Init()
ioc.TryAddSingleton(typeof(ICacheProvider), typeof(CacheProvider));
}

#if !NET40
[MemberNotNullWhen(true, nameof(_client))]
#endif
private Boolean Valid()
{
//if (Server.IsNullOrEmpty()) throw new ArgumentNullException(nameof(Server));
Expand Down
6 changes: 3 additions & 3 deletions Stardust/Stardust.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'!='net40'">
<PackageReference Include="NewLife.Core" Version="10.7.2024.0201" />
<PackageReference Include="NewLife.Remoting" Version="2.7.2024.0201" />
<PackageReference Include="NewLife.Core" Version="10.7.2024.0202" />
<PackageReference Include="NewLife.Remoting" Version="2.7.2024.0202" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net40'">
<PackageReference Include="NewLife.Core" Version="10.7.2024.0201-net40" />
<PackageReference Include="NewLife.Core" Version="10.7.2024.0202-net40" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="NewLife.Core" Version="10.7.2024.201" />
<PackageReference Include="NewLife.Core" Version="10.7.2024.202" />
<PackageReference Include="SSH.NET" Version="2023.0.1" />
</ItemGroup>

Expand Down

0 comments on commit d7b93bf

Please sign in to comment.