Try out just using connkey as the semaphore key instead of ftok

pull/3600/head
Isaac Connor 2022-09-22 16:22:36 -04:00
parent 8a6db4a5e7
commit 63e4c81d9c
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@ if ( !($_REQUEST['connkey'] && $_REQUEST['command']) ) {
mkdir(ZM_PATH_SOCKS);
# The file that we point ftok to has to exist, and only exist if zms is running, so we are pointing it at the .sock
$key = ftok(ZM_PATH_SOCKS.'/zms-'.$connkey.'s.sock', 'Z');
$key = $connkey;
#$key = ftok(ZM_PATH_SOCKS.'/zms-'.$connkey.'s.sock', 'Z');
$semaphore = sem_get($key, 1);
$semaphore_tries = 10;
$have_semaphore = false;