for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the slince/spike package.
*
* (c) Slince <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Spike\Server\ChunkServer\Timer;
/**
* @codeCoverageIgnore
class ReviewPublicConnection extends Timer
{
* {@inheritdoc}
public function __invoke()
foreach ($this->chunkServer->getPublicConnections() as $publicConnection) {
if ($publicConnection->getWaitingDuration() > 120) {
$this->chunkServer->closePublicConnection($publicConnection, 'Waiting for more than 60 seconds without responding');
}
public function isPeriodic()
return true;
public function getInterval()
return 60 * 1;