diff --git a/src/Ratchet/App.php b/src/Ratchet/App.php index c119d41..f378534 100644 --- a/src/Ratchet/App.php +++ b/src/Ratchet/App.php @@ -104,16 +104,14 @@ class App { $decorated = $controller; } elseif ($controller instanceof WampServerInterface) { $decorated = new WsServer(new WampServer($controller)); + $decorated->enableKeepAlive($this->_server->loop); } elseif ($controller instanceof MessageComponentInterface) { $decorated = new WsServer($controller); + $decorated->enableKeepAlive($this->_server->loop); } else { $decorated = $controller; } - if ($decorated instanceof WsServer) { - $decorated->enableKeepAlive($this->_server->loop, 30); - } - if ($httpHost === null) { $httpHost = $this->httpHost; }