Checking in Ray's update to ServiceWaiter.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2374 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
andrzej@threerings.net
2008-08-28 23:08:04 +00:00
parent 403200041e
commit add5867c13
@@ -143,7 +143,6 @@ public class ServiceWaiter<T>
{ {
if (_success == 0) { if (_success == 0) {
synchronized (this) { synchronized (this) {
while (_success == 0) {
try { try {
// wait for the response, timing out after a while // wait for the response, timing out after a while
if (_timeout == NO_TIMEOUT) { if (_timeout == NO_TIMEOUT) {
@@ -152,7 +151,6 @@ public class ServiceWaiter<T>
} else { } else {
wait(1000L * _timeout); wait(1000L * _timeout);
} }
// if we get here without some sort of response, then // if we get here without some sort of response, then
// we've timed out // we've timed out
if (_success == 0) { if (_success == 0) {
@@ -160,8 +158,8 @@ public class ServiceWaiter<T>
} }
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
// fall through and wait again throw (TimeoutException)
} new TimeoutException().initCause(ie);
} }
} }
} }