fix task log streaming

This commit is contained in:
Xavier Léauté 2014-12-13 15:22:55 -08:00
parent 016d07fda3
commit bd91a40491
1 changed files with 1 additions and 3 deletions

View File

@ -412,9 +412,7 @@ public class OverlordResource
try {
final Optional<ByteSource> stream = taskLogStreamer.streamTaskLog(taskid, offset);
if (stream.isPresent()) {
try(InputStream istream = stream.get().openStream()) {
return Response.ok(istream).build();
}
return Response.ok(stream.get().openStream()).build();
} else {
return Response.status(Response.Status.NOT_FOUND)
.entity(