@@ -98,12 +98,10 @@ function generateScpCommand(Server $server, string $source, string $dest)
98
98
$ muxPersistTime = config ('constants.ssh.mux_persist_time ' );
99
99
100
100
$ scp_command = "timeout $ timeout scp " ;
101
- // Check if multiplexing is enabled
102
- $ muxEnabled = config ('constants.ssh.mux_enabled ' , true );
101
+ $ muxEnabled = config ('constants.ssh.mux_enabled ' , true ) && config ('coolify.is_windows_docker_desktop ' ) == false ;
103
102
// ray('SSH Multiplexing Enabled:', $muxEnabled)->blue();
104
103
105
104
if ($ muxEnabled ) {
106
- // Always use multiplexing when enabled
107
105
$ muxSocket = "/var/www/html/storage/app/ssh/mux/ {$ server ->muxFilename ()}" ;
108
106
$ scp_command .= "-o ControlMaster=auto -o ControlPath= $ muxSocket -o ControlPersist= {$ muxPersistTime } " ;
109
107
ensureMultiplexedConnection ($ server );
@@ -163,9 +161,7 @@ function generateSshCommand(Server $server, string $command)
163
161
164
162
$ ssh_command = "timeout $ timeout ssh " ;
165
163
166
- // Check if multiplexing is enabled
167
- $ muxEnabled = config ('constants.ssh.mux_enabled ' , true );
168
- // ray('SSH Multiplexing Enabled:', $muxEnabled)->blue();
164
+ $ muxEnabled = config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false ;
169
165
170
166
if ($ muxEnabled ) {
171
167
// Always use multiplexing when enabled
@@ -201,6 +197,10 @@ function generateSshCommand(Server $server, string $command)
201
197
202
198
function ensureMultiplexedConnection (Server $ server )
203
199
{
200
+ if (!(config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false )) {
201
+ return ;
202
+ }
203
+
204
204
static $ ensuredConnections = [];
205
205
206
206
if (isset ($ ensuredConnections [$ server ->id ])) {
@@ -260,6 +260,10 @@ function ensureMultiplexedConnection(Server $server)
260
260
261
261
function shouldResetMultiplexedConnection (Server $ server )
262
262
{
263
+ if (!(config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false )) {
264
+ return false ;
265
+ }
266
+
263
267
static $ ensuredConnections = [];
264
268
265
269
if (! isset ($ ensuredConnections [$ server ->id ])) {
@@ -275,6 +279,10 @@ function shouldResetMultiplexedConnection(Server $server)
275
279
276
280
function resetMultiplexedConnection (Server $ server )
277
281
{
282
+ if (!(config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false )) {
283
+ return ;
284
+ }
285
+
278
286
static $ ensuredConnections = [];
279
287
280
288
if (isset ($ ensuredConnections [$ server ->id ])) {
0 commit comments