An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
remove cache
peaklabs-dev28bcd0023cc4
diff --git a/app/Jobs/CleanupStaleMultiplexedConnections.php b/app/Jobs/CleanupStaleMultiplexedConnections.phpindex 733adb8d44..bcca77c182 100644--- a/app/Jobs/CleanupStaleMultiplexedConnections.php+++ b/app/Jobs/CleanupStaleMultiplexedConnections.php@@ -25,19 +25,13 @@ class CleanupStaleMultiplexedConnections implements ShouldQueueprivate function cleanupStaleConnection(Server $server){- $cacheKey = "mux_connection_{$server->id}";- $cachedConnection = cache()->get($cacheKey);+ $muxSocket = "/tmp/mux_{$server->id}";+ $checkCommand = "ssh -O check -o ControlPath=$muxSocket {$server->user}@{$server->ip} 2>/dev/null";+ $checkProcess = Process::run($checkCommand);- if ($cachedConnection) {- $muxSocket = $cachedConnection['muxSocket'];- $checkCommand = "ssh -O check -o ControlPath=$muxSocket {$server->user}@{$server->ip} 2>/dev/null";- $checkProcess = Process::run($checkCommand);-- if ($checkProcess->exitCode() !== 0) {- $closeCommand = "ssh -O exit -o ControlPath=$muxSocket {$server->user}@{$server->ip} 2>/dev/null";- Process::run($closeCommand);- cache()->forget($cacheKey);- }+ if ($checkProcess->exitCode() !== 0) {+ $closeCommand = "ssh -O exit -o ControlPath=$muxSocket {$server->user}@{$server->ip} 2>/dev/null";+ Process::run($closeCommand);}}}