for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Spike library
* @author Tao <[email protected]>
*/
namespace Spike\Server\TunnelServer\Timer;
class ReviewPublicConnection extends PeriodicTimer
{
* {@inheritdoc}
public function __invoke()
foreach ($this->tunnelServer->getPublicConnections() as $key => $publicConnection) {
if ($publicConnection->getWaitingDuration() > 120) {
$this->tunnelServer->closePublicConnection($publicConnection, 'Waiting for more than 60 seconds without responding');
$this->tunnelServer->getPublicConnections()->remove($key);
}
public function getInterval()
return 60 * 1;