From e7541fdfcf6a1e27370be89dc14421457a0ea2ad Mon Sep 17 00:00:00 2001 From: Chris Boden <cboden@gmail.com> Date: Sat, 15 Jun 2013 14:09:19 -0400 Subject: [PATCH] App uses counter for ID instead of random --- src/Ratchet/App.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ratchet/App.php b/src/Ratchet/App.php index 7382653..6728c30 100644 --- a/src/Ratchet/App.php +++ b/src/Ratchet/App.php @@ -38,6 +38,8 @@ class App { */ protected $httpHost; + protected $_routeCounter = 0; + /** * @param string $httpHost * @param int $port @@ -90,7 +92,7 @@ class App { $decorated = $controller; } - $this->routes->add(uniqid(), new Route($path, array('_controller' => $decorated), array(), array(), $this->httpHost)); + $this->routes->add('rr-' . ++$this->_routeCounter, new Route($path, array('_controller' => $decorated), array(), array(), $this->httpHost)); return $decorated; }