make sure to close yielder in MetricsEmittingQueryRunner

This commit is contained in:
Xavier Léauté 2014-06-03 11:35:26 -07:00
parent 97d5455f3a
commit 99c9a2cf05
1 changed files with 13 additions and 11 deletions

View File

@ -167,6 +167,7 @@ public class MetricsEmittingQueryRunner<T> implements QueryRunner<T>
@Override
public void close() throws IOException
{
try {
if (!isDone() && builder.getUser10() == null) {
builder.setUser10("short");
}
@ -177,9 +178,10 @@ public class MetricsEmittingQueryRunner<T> implements QueryRunner<T>
if (creationTime > 0) {
emitter.emit(builder.build("query/wait", startTime - creationTime));
}
} finally {
yielder.close();
}
}
};
}
};