multipathd: reset delay_wait_checks counter on failure
[multipath-tools/.git] / multipathd / main.c
index 7fc97ba..cc555bb 100644 (file)
@@ -2041,8 +2041,12 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
                                        pp->wait_checks = pp->mpp->delay_wait_checks;
                                        pp->watch_checks = 0;
                                }
-                       }else
+                       } else {
                                fail_path(pp, 0);
+                               if (pp->wait_checks > 0)
+                                       pp->wait_checks =
+                                               pp->mpp->delay_wait_checks;
+                       }
 
                        /*
                         * cancel scheduled failback