Unset the event socket handles.

This commit is contained in:
FusionPBX 2022-05-20 17:49:42 -06:00 committed by GitHub
parent ed1d1afd07
commit 53e8ab5f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,7 @@ if (!class_exists('presence')) {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$cmd = 'show calls as json';
$json = event_socket_request($fp, 'api '.$cmd);
unset($fp);
$call_array = json_decode($json, true);
if (isset($call_array['rows'])) {
$x = 0;
@ -67,6 +68,7 @@ if (!class_exists('presence')) {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$cmd = 'show calls as json';
$json = event_socket_request($fp, 'api '.$cmd);
unset($fp);
$call_array = json_decode($json, true);
if (isset($call_array['rows'])) {
$x = 0;