1 From: Jon Trowbridge <trow@novell.com>
3 Enforce minimum maxSleepCount 1, we shouldn't just fail right away if
4 lockWaitTimeout < LOCK_POLL_INTERVAL.
7 ===================================================================
8 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/Lock.cs,v
9 retrieving revision 1.6.4.9
10 diff -u -3 -p -r1.6.4.9 Lock.cs
11 --- Store/Lock.cs 25 Sep 2006 22:54:07 -0000 1.6.4.9
12 +++ Store/Lock.cs 30 Sep 2006 02:00:45 -0000
13 @@ -61,6 +61,8 @@ namespace Lucene.Net.Store
14 bool locked = Obtain();
15 int maxSleepCount = (int) (lockWaitTimeout / LOCK_POLL_INTERVAL);
17 + maxSleepCount = System.Math.Max (maxSleepCount, 1);
21 if (sleepCount++ == maxSleepCount)
22 @@ -135,4 +137,4 @@ namespace Lucene.Net.Store
27 \ No newline at end of file