Skip to content

Commit 632eb94

Browse files
committed
Merge pull request #99 from mbabker/patch-1
Adjust order of operations
2 parents 460e74d + 0ad1463 commit 632eb94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Server/App/Dispatcher/TopicDispatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ public function dispatch($calledMethod, ConnectionInterface $conn = null, Topic
131131
{
132132
$dispatched = false;
133133

134-
foreach ((array) $request->getRoute()->getCallback() as $callback) {
135-
$appTopic = $this->topicRegistry->getTopic($callback);
134+
if ($topic) {
135+
foreach ((array) $request->getRoute()->getCallback() as $callback) {
136+
$appTopic = $this->topicRegistry->getTopic($callback);
136137

137-
if ($topic) {
138138
if ($appTopic instanceof TopicPeriodicTimerInterface) {
139139
$appTopic->setPeriodicTimer($this->topicPeriodicTimer);
140140

0 commit comments

Comments
 (0)