Cancel if bus not available in client
This commit is contained in:
parent
4cfb66756f
commit
324fa6e519
@ -144,7 +144,7 @@ class CommandBusClient implements CommandBusInterface
|
|||||||
{
|
{
|
||||||
if (!$this->connection) {
|
if (!$this->connection) {
|
||||||
return new Promise(function (callable $resolve, callable $canceller) {
|
return new Promise(function (callable $resolve, callable $canceller) {
|
||||||
$canceller("Not connected to command bus.");
|
$canceller(new \RuntimeException("Not connected to command bus."));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user