1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 02:39:47 +02:00

Move from React 0.4.0 to 0.3.4 for PHP 5.3 compatibility reasons

This commit is contained in:
Afterster 2014-04-13 08:58:34 +02:00
parent d3f01a3bc7
commit 7f82bea13e
50 changed files with 608 additions and 1937 deletions

View file

@ -30,14 +30,16 @@ class Server extends EventEmitter implements ServerInterface
}
stream_set_blocking($this->master, 0);
$this->loop->addReadStream($this->master, function ($master) {
$that = $this;
$this->loop->addReadStream($this->master, function ($master) use ($that) {
$newSocket = stream_socket_accept($master);
if (false === $newSocket) {
$this->emit('error', array(new \RuntimeException('Error accepting new connection')));
$that->emit('error', array(new \RuntimeException('Error accepting new connection')));
return;
}
$this->handleConnection($newSocket);
$that->handleConnection($newSocket);
});
}