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:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user