Skip to content

Commit 5aee564

Browse files
committed
add shouldStop comments
1 parent f3da28b commit 5aee564

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $callback = function () {
5959
if (empty($news)) {
6060
return false; // Return false if no new messages
6161
}
62-
$shouldStop = false;
62+
$shouldStop = false; // Stop if something happens or to clear connection, browser will retry
6363
if ($shouldStop) {
6464
throw new StopSSEException();
6565
}
@@ -92,7 +92,7 @@ public function getNewsStream()
9292
if (empty($news)) {
9393
return false; // Return false if no new messages
9494
}
95-
$shouldStop = false;
95+
$shouldStop = false; // Stop if something happens or to clear connection, browser will retry
9696
if ($shouldStop) {
9797
throw new StopSSEException();
9898
}
@@ -144,7 +144,7 @@ $server->on('Request', function (Request $request, Response $response) use ($ser
144144
if (empty($news)) {
145145
return false; // Return false if no new messages
146146
}
147-
$shouldStop = false;
147+
$shouldStop = false; // Stop if something happens or to clear connection, browser will retry
148148
if ($shouldStop) {
149149
throw new StopSSEException();
150150
}

0 commit comments

Comments
 (0)