From edc824d7dee6743a0aa1ee84f9978a1222c413b2 Mon Sep 17 00:00:00 2001 From: Justin LeFebvre Date: Sun, 23 Oct 2022 10:32:06 -0400 Subject: [PATCH] Fix a small bug with my latest fix to RootContextDecorator (#1834) --- src/Proto.Actor/Context/RootContextDecorator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Proto.Actor/Context/RootContextDecorator.cs b/src/Proto.Actor/Context/RootContextDecorator.cs index df11794dea..6cf331e7a0 100644 --- a/src/Proto.Actor/Context/RootContextDecorator.cs +++ b/src/Proto.Actor/Context/RootContextDecorator.cs @@ -48,8 +48,11 @@ public virtual Task RequestAsync(PID target, object message, CancellationT public virtual Task PoisonAsync(PID pid) => _context.PoisonAsync(pid); - public IRootContext WithSenderMiddleware(params Func[] middleware) => + public IRootContext WithSenderMiddleware(params Func[] middleware) + { _context = _context.WithSenderMiddleware(middleware); + return this; + } public virtual PID? Parent => null; public virtual PID Self => null!;