Browse Source

Create the $fp handle

FusionPBX 3 years ago
parent
commit
03c5f55089
1 changed files with 6 additions and 0 deletions
  1. 6 0
      resources/classes/cache.php

+ 6 - 0
resources/classes/cache.php

@@ -187,6 +187,12 @@ class cache {
 
 
 		//cache method file 
 		//cache method file 
 			if ($_SESSION['cache']['method']['text'] == "file") {
 			if ($_SESSION['cache']['method']['text'] == "file") {
+				// connect to event socket
+					$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
+					if ($fp === false) {
+						return false;
+					}
+
 				//send a custom event
 				//send a custom event
 					$event = "sendevent CUSTOM\n";
 					$event = "sendevent CUSTOM\n";
 					$event .= "Event-Name: CUSTOM\n";
 					$event .= "Event-Name: CUSTOM\n";