🐛 Fix websocket create rpc

This commit is contained in:
2025-09-21 20:20:31 +08:00
parent f81e3dc9f4
commit e3657386cd
2 changed files with 6 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ public class WebSocketService
} }
catch (RpcException ex) catch (RpcException ex)
{ {
_logger.LogError(ex, $"Error forwarding packet to endpoint: {packet.Endpoint}"); _logger.LogError(ex, $"Error forwarding packet to endpoint: {packet.Endpoint} (${endpoint})");
} }
} }
catch (Exception ex) catch (Exception ex)

View File

@@ -9,6 +9,10 @@ public static class GrpcClientHelper
{ {
public static CallInvoker CreateCallInvoker(string url) public static CallInvoker CreateCallInvoker(string url)
{ {
return GrpcChannel.ForAddress(url).CreateCallInvoker(); return GrpcChannel.ForAddress(url, new GrpcChannelOptions
{
HttpHandler = new HttpClientHandler()
{ ServerCertificateCustomValidationCallback = (_, _, _, _) => true },
}).CreateCallInvoker();
} }
} }