Skip to content

Commit

Permalink
Update Client.php
Browse files Browse the repository at this point in the history
  • Loading branch information
localzet committed Jan 1, 2025
1 parent 788787b commit 70a3f84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ public static function onMessage(ConnectionInterface &$connection, mixed $reques
*/
public static function onClose(): void
{
echo "Предупреждение: Соединение закрыто, попытка переподключения\n";
Timer::add(0.5, function() {
echo "Предупреждение: Соединение закрыто, попытка переподключения\n";
}, persistent: false);
self::$connection = null;
self::clearTimer();
self::$reconnectTimer = Timer::add(1, [self::class, 'connect'], [self::$socketName]);
Expand Down

0 comments on commit 70a3f84

Please sign in to comment.