- Improved "health check" for WebSocket

This commit is contained in:
Exodus4D
2017-01-21 23:21:25 +01:00
parent 07c0127e92
commit 378203f582
6 changed files with 81 additions and 15 deletions

View File

@@ -946,10 +946,15 @@ class Setup extends Controller {
// $ttl for health check
$ttl = 600;
$heachCheckToken = microtime(true);
// ping TCP Socket with checkToken
self::checkTcpSocket($ttl, $heachCheckToken);
$socketInformation = [
'tcpSocket' => [
'label' => 'Socket (intern) [TCP]',
'online' => (self::checkTcpSocket($ttl) == 'OK'),
'online' => true,
'data' => [
[
'label' => 'HOST',
@@ -968,7 +973,8 @@ class Setup extends Controller {
'value' => $ttl,
'check' => !empty( $ttl )
]
]
],
'token' => $heachCheckToken
],
'webSocket' => [
'label' => 'WebSocket (clients) [HTTP]',