]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/CIFSPlugin.pm
fix #3097: cifs, nfs: increase connection check timeout to 10s
[pve-storage.git] / PVE / Storage / CIFSPlugin.pm
index 6edbc9df52b78699d66e551de7c33107cf160fe9..7ec71642f925679a27c56d9bb6128e0c7d0727a7 100644 (file)
@@ -262,14 +262,12 @@ sub check_connection {
     } else {
        push @$cmd, '-U', 'Guest','-N';
     }
-
     push @$cmd, '-c', 'echo 1 0';
 
     my $out_str;
-    eval {
-       run_command($cmd, timeout => 2, outfunc => sub {$out_str .= shift;},
-                   errfunc => sub {});
-    };
+    my $out = sub { $out_str .= shift };
+
+    eval { run_command($cmd, timeout => 10, outfunc => $out, errfunc => sub {}) };
 
     if (my $err = $@) {
        die "$out_str\n" if defined($out_str) &&