aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/driver.c b/driver.c
index 1172ca30..403bde10 100644
--- a/driver.c
+++ b/driver.c
@@ -2197,15 +2197,20 @@ const struct method *proto; /* protocol method table */
break;
if (ok != PS_LOCKBUSY)
lockouts = 0;
-
- /*
- * Allow time for the server lock to release. if we don't
- * do this, we'll often hit a locked-mailbox condition and fail.
- */
- sleep(3);
+ else if (lockouts >= MAX_LOCKOUTS)
+ break;
+ else /* ok == PS_LOCKBUSY */
+ {
+ /*
+ * Allow time for the server lock to release. if we
+ * don't do this, we'll often hit a locked-mailbox
+ * condition and fail.
+ */
+ lockouts++;
+ sleep(3);
+ }
} while
- (ok == PS_MAXFETCH
- || (ok == PS_LOCKBUSY && lockouts++ < MAX_LOCKOUTS));
+ (ok == PS_MAXFETCH || ok == PS_LOCKBUSY);
return(ok);
}