From 4cfb66756f9495d77fb040dd42a4f363dfa71152 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 1 Mar 2024 18:32:21 +0100 Subject: [PATCH] Error fix --- src/CommandBusClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommandBusClient.php b/src/CommandBusClient.php index c8d3c98..880f8de 100644 --- a/src/CommandBusClient.php +++ b/src/CommandBusClient.php @@ -143,8 +143,8 @@ class CommandBusClient implements CommandBusInterface public function execute(string $command, array $context): PromiseInterface { if (!$this->connection) { - return new Promise(function (callable $resolve) { - $resolve(new \RuntimeException("Not connected to command bus.")); + return new Promise(function (callable $resolve, callable $canceller) { + $canceller("Not connected to command bus."); }); }