mirror of https://github.com/apache/druid.git
EventReceiverFirehose: Drain buffer when closed, until empty.
This commit is contained in:
parent
6305dfe1b9
commit
36569094ce
|
@ -207,8 +207,11 @@ public class EventReceiverFirehoseFactory implements FirehoseFactory<MapInputRow
|
||||||
{
|
{
|
||||||
synchronized (readLock) {
|
synchronized (readLock) {
|
||||||
try {
|
try {
|
||||||
while (!closed && nextRow == null) {
|
while (nextRow == null) {
|
||||||
nextRow = buffer.poll(500, TimeUnit.MILLISECONDS);
|
nextRow = buffer.poll(500, TimeUnit.MILLISECONDS);
|
||||||
|
if (closed) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (InterruptedException e) {
|
catch (InterruptedException e) {
|
||||||
|
|
Loading…
Reference in New Issue