mirror of https://github.com/apache/druid.git
Merge pull request #976 from metamx/deadlockFix
Fix deadlock in DirectDruidClient
This commit is contained in:
commit
63df70cbe2
|
@ -214,15 +214,12 @@ public class DirectDruidClient<T> implements QueryRunner<T>
|
||||||
@Override
|
@Override
|
||||||
public InputStream nextElement()
|
public InputStream nextElement()
|
||||||
{
|
{
|
||||||
synchronized (done) {
|
try {
|
||||||
try {
|
return queue.take();
|
||||||
// Ensures more elements are expected via `done`
|
}
|
||||||
return queue.take();
|
catch (InterruptedException e) {
|
||||||
}
|
Thread.currentThread().interrupt();
|
||||||
catch (InterruptedException e) {
|
throw Throwables.propagate(e);
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
throw Throwables.propagate(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue