@@ -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,8 +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 );
164
+ $ muxEnabled = config ('constants.ssh.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false ;
168
165
// ray('SSH Multiplexing Enabled:', $muxEnabled)->blue();
169
166
if ($ muxEnabled ) {
170
167
// Always use multiplexing when enabled
@@ -200,6 +197,10 @@ function generateSshCommand(Server $server, string $command)
200
197
201
198
function ensureMultiplexedConnection (Server $ server )
202
199
{
200
+ if (!(config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false )) {
201
+ return ;
202
+ }
203
+
203
204
static $ ensuredConnections = [];
204
205
205
206
if (isset ($ ensuredConnections [$ server ->id ])) {
@@ -267,6 +268,10 @@ function ensureMultiplexedConnection(Server $server)
267
268
268
269
function shouldResetMultiplexedConnection (Server $ server )
269
270
{
271
+ if (!(config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false )) {
272
+ return false ;
273
+ }
274
+
270
275
static $ ensuredConnections = [];
271
276
272
277
if (! isset ($ ensuredConnections [$ server ->id ])) {
@@ -282,6 +287,10 @@ function shouldResetMultiplexedConnection(Server $server)
282
287
283
288
function resetMultiplexedConnection (Server $ server )
284
289
{
290
+ if (!(config ('coolify.mux_enabled ' ) && config ('coolify.is_windows_docker_desktop ' ) == false )) {
291
+ return ;
292
+ }
293
+
285
294
static $ ensuredConnections = [];
286
295
287
296
if (isset ($ ensuredConnections [$ server ->id ])) {
0 commit comments