Skip to content

Conversation

chrisharrison
Copy link
Contributor

When running websockets on Heroku, the connections are subject to a timeout:

https://devcenter.heroku.com/articles/websockets#timeouts

The solution is to periodically send messages over the connection to keep it alive.

Usage:

$app = new SomeContainer();

$server = new Server(...);
$server->registerApplication('name', ...);
$server->addTimer(30000, function () use ($app) {
    $app->doSomething();
});
$server->run();

@nekudo nekudo changed the base branch from master to release/2.1.0 November 15, 2020 10:37
@nekudo nekudo merged commit 1567309 into bloatless:release/2.1.0 Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants