Merge branch 'configurable-keep-alive-intervals'

This commit is contained in:
Chris Boden 2017-10-09 13:05:53 -04:00
commit bddcb1af17

View File

@ -104,16 +104,14 @@ class App {
$decorated = $controller; $decorated = $controller;
} elseif ($controller instanceof WampServerInterface) { } elseif ($controller instanceof WampServerInterface) {
$decorated = new WsServer(new WampServer($controller)); $decorated = new WsServer(new WampServer($controller));
$decorated->enableKeepAlive($this->_server->loop);
} elseif ($controller instanceof MessageComponentInterface) { } elseif ($controller instanceof MessageComponentInterface) {
$decorated = new WsServer($controller); $decorated = new WsServer($controller);
$decorated->enableKeepAlive($this->_server->loop);
} else { } else {
$decorated = $controller; $decorated = $controller;
} }
if ($decorated instanceof WsServer) {
$decorated->enableKeepAlive($this->_server->loop, 30);
}
if ($httpHost === null) { if ($httpHost === null) {
$httpHost = $this->httpHost; $httpHost = $this->httpHost;
} }