fix timeout check bug in DirectDruidClient (#4287)

This commit is contained in:
Himanshu 2017-05-17 15:47:32 -05:00 committed by Fangjin Yang
parent d9f423f55d
commit 0e056863e4

View File

@ -375,7 +375,7 @@ public class DirectDruidClient<T> implements QueryRunner<T>
private long checkQueryTimeout() private long checkQueryTimeout()
{ {
long timeLeft = timeoutAt - System.currentTimeMillis(); long timeLeft = timeoutAt - System.currentTimeMillis();
if (timeLeft >= 0) { if (timeLeft <= 0) {
String msg = StringUtils.safeFormat("Query[%s] url[%s] timed out.", query.getId(), url); String msg = StringUtils.safeFormat("Query[%s] url[%s] timed out.", query.getId(), url);
setupResponseReadFailure(msg, null); setupResponseReadFailure(msg, null);
throw new RE(msg); throw new RE(msg);