Merge pull request #976 from metamx/deadlockFix

Fix deadlock in DirectDruidClient
This commit is contained in:
xvrl 2014-12-18 12:03:08 -08:00
commit 63df70cbe2
1 changed files with 6 additions and 9 deletions

View File

@ -214,9 +214,7 @@ public class DirectDruidClient<T> implements QueryRunner<T>
@Override @Override
public InputStream nextElement() public InputStream nextElement()
{ {
synchronized (done) {
try { try {
// Ensures more elements are expected via `done`
return queue.take(); return queue.take();
} }
catch (InterruptedException e) { catch (InterruptedException e) {
@ -225,7 +223,6 @@ public class DirectDruidClient<T> implements QueryRunner<T>
} }
} }
} }
}
) )
); );
} }