Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite04298b

Browse files
Fix
1 parente96f873 commite04298b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/Symfony/Component/Messenger/Middleware/LockMiddleware.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespaceSymfony\Component\Messenger\Middleware;
1313

14+
useSymfony\Component\Lock\Key;
1415
useSymfony\Component\Lock\LockFactory;
1516
useSymfony\Component\Messenger\Envelope;
1617
useSymfony\Component\Messenger\Message\LockableMessageInterface;
@@ -39,9 +40,11 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
3940
if (null ===$envelope->last(ReceivedStamp::class)) {
4041
if ($messageinstanceof LockableMessageInterface) {
4142
// If we're trying to dispatch a lockable message.
42-
$key =$message->getKey();
43+
$keyResource =$message->getKey();
44+
45+
if (null !==$keyResource) {
46+
$key =newKey($keyResource);
4347

44-
if (null !==$key) {
4548
// The acquire call must be done before stamping the message
4649
// in order to have the full state of the key in the stamp.
4750
$lock =$messageinstanceof TTLAwareLockableMessageInterface

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp