From d3a8cffcf746c9ab0c0655d135838f439ef407db Mon Sep 17 00:00:00 2001 From: Vitali Semianiaka Date: Thu, 1 Jan 2026 23:26:24 +0300 Subject: [PATCH] fix stream --- WorkflowRuntimeRunner.cs | 6 ++---- s8n-runtime.csproj | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WorkflowRuntimeRunner.cs b/WorkflowRuntimeRunner.cs index fc84c3b..432c5f8 100644 --- a/WorkflowRuntimeRunner.cs +++ b/WorkflowRuntimeRunner.cs @@ -1,8 +1,5 @@ namespace s8n_runtime; -using System.Text.Json; -using System.Text.Json.Serialization; - public class WorkflowRuntimeRunner { private static readonly JsonSerializerOptions serializerOptions = new(JsonSerializerDefaults.Web) @@ -43,7 +40,8 @@ public class WorkflowRuntimeRunner } else { - runtime = JsonSerializer.Deserialize(File.OpenRead(filePath), serializerOptions)!; + using var stream = File.OpenRead(filePath); + runtime = JsonSerializer.Deserialize(stream, serializerOptions)!; } runtime.Prepare(); diff --git a/s8n-runtime.csproj b/s8n-runtime.csproj index d33b18c..72dfa39 100644 --- a/s8n-runtime.csproj +++ b/s8n-runtime.csproj @@ -11,7 +11,7 @@ true Sharp8N.Runtime - 1.0.11 + 1.0.12 Vitalick S Sharp8N Sharp8N runtime library, that allows run s8n workflows