diff --git a/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandler.cs b/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandler.cs
index e33c3e6..9904e09 100644
--- a/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandler.cs
+++ b/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandler.cs
@@ -29,7 +29,7 @@ public HostHttpHandler(ResourceManager resourceManager) : base(resourceManager)
///
///
///
- protected override async Task HandleHttpClient(HttpContext httpClient)
+ protected override async Task HandleHttpClient(HttpContext httpClient)
{
var reader = new StreamReader(httpClient.Request.Body);
var requestBody = await reader.ReadToEndAsync();
@@ -63,6 +63,7 @@ protected override async Task HandleHttpClient(HttpContext httpClient)
await httpClient.Response.Body.WriteAsync(bytes, 0, bytes.Length);
}
+ return true;
}
}
}
diff --git a/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandlerBase.cs b/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandlerBase.cs
index 429be23..43ccf04 100644
--- a/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandlerBase.cs
+++ b/src/CSharp/EasyMicroservices.Laboratory/Engine/Net/Http/HostHttpHandlerBase.cs
@@ -81,8 +81,8 @@ protected virtual async Task InternalStart(int port)
var app = builder.Build();
app.Use(async (context, next) =>
{
- await HandleHttpClient(context);
- await next(context);
+ if (!await HandleHttpClient(context))
+ await next(context);
});
await Task.WhenAny(app.RunAsync(null), Task.Delay(3000));
}
@@ -92,7 +92,7 @@ protected virtual async Task InternalStart(int port)
///
///
///
- protected abstract Task HandleHttpClient(HttpContext httpClient);
+ protected abstract Task HandleHttpClient(HttpContext httpClient);
string _lastResponseBody = "";
///