From 44a27df9a5d28fb81e719fc95ddad9bc5888f75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Wed, 4 Dec 2024 00:47:07 +0800 Subject: [PATCH] v2.3.2024.1203 --- NewLife.IoT/Clients/IServiceHandler.cs | 6 +++--- NewLife.IoT/NewLife.IoT.csproj | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NewLife.IoT/Clients/IServiceHandler.cs b/NewLife.IoT/Clients/IServiceHandler.cs index df0295f..a502089 100644 --- a/NewLife.IoT/Clients/IServiceHandler.cs +++ b/NewLife.IoT/Clients/IServiceHandler.cs @@ -96,7 +96,7 @@ public static async Task ExecuteService(this IServiceHandler var rs = new ServiceReplyModel { Id = model.Id, Status = ServiceStatus.已完成 }; try { - var result = await OnService(client, model); + var result = await OnService(client, model).ConfigureAwait(false); if (result is ServiceReplyModel reply) { reply.Id = model.Id; @@ -140,8 +140,8 @@ public static async Task ExecuteService(this IServiceHandler if (d is Func func) return func(model.InputData); if (d is Func func2) return func2(model); - if (d is Func> func3) return await func3(model.InputData); - if (d is Func> func4) return await func4(model); + if (d is Func> func3) return await func3(model.InputData).ConfigureAwait(false); + if (d is Func> func4) return await func4(model).ConfigureAwait(false); return null; } diff --git a/NewLife.IoT/NewLife.IoT.csproj b/NewLife.IoT/NewLife.IoT.csproj index 336bfda..b6a0475 100644 --- a/NewLife.IoT/NewLife.IoT.csproj +++ b/NewLife.IoT/NewLife.IoT.csproj @@ -18,6 +18,8 @@ latest True ..\Doc\newlife.snk + latest + CA2007 @@ -50,7 +52,7 @@ - +