Skip to content

Commit 0236a6f

Browse files
committed
remove stale lock file (older than 5 minutes)
1 parent 8f2ae53 commit 0236a6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

proxy.php

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ function startLoolwsd()
7070
// Extract the AppImage if FUSE is not available
7171
$launchCmd = "bash -c \"( $appImage || $appImage --appimage-extract-and-run ) >/dev/null & disown\"";
7272

73+
// Remove stale lock file (just in case)
74+
if (file_exists('/tmp/loolwsd.lock'))
75+
if (time() - filectime('/tmp/loolwsd.lock') > 60 * 5)
76+
unlink('/tmp/loolwsd.lock');
77+
7378
// Prevent second start
7479
$lock = @fopen("/tmp/loolwsd.lock", "x");
7580
if ($lock)

0 commit comments

Comments
 (0)