From dbaee5338abf7116ec1c36e518d0206962ae2b06 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sun, 4 Dec 2022 04:21:17 +0000 Subject: [PATCH] Temporary? fix for send.php if it hangs, which it does --- Rocksolid_Light/rslight/scripts/send.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/rslight/scripts/send.php b/Rocksolid_Light/rslight/scripts/send.php index e182802..b18c40d 100755 --- a/Rocksolid_Light/rslight/scripts/send.php +++ b/Rocksolid_Light/rslight/scripts/send.php @@ -35,8 +35,15 @@ if (posix_getsid($pid) === false || !is_file($lockfile)) { print "Starting Send...\n"; file_put_contents($lockfile, getmypid()); // create lockfile } else { - print "Send currently running\n"; - exit; + if((time() - filetime($lockfile)) > 960) { + posix_kill($pid, 9); + unlink($lockfile); + print "Killing and restarting Send...\n"; + file_put_contents($lockfile, getmypid()); // create lockfile + } else { + print "Send currently running\n"; + exit; + } } $ns=nntp2_open($CONFIG['remote_server'], $CONFIG['remote_port']); if($ns == false) {