There was an error while loading. Please reload this page.
2 parents 7d11d66 + 2061163 commit 41f0c5fCopy full SHA for 41f0c5f
src/SSE.php
@@ -4,7 +4,7 @@
4
5
class SSE
6
{
7
- public function start(Update $update, $eventType = null)
+ public function start(Update $update, $eventType = null, int $milliRetry = 2000)
8
9
while (true) {
10
$changedData = $update->getUpdatedData();
@@ -13,7 +13,7 @@ public function start(Update $update, $eventType = null)
13
'id' => uniqid('', true),
14
'type' => $eventType,
15
'data' => (string)$changedData,
16
- 'retry' => 2000,//reconnect after 2s
+ 'retry' => $milliRetry,
17
];
18
} else {
19
$event = [
0 commit comments