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 { try {
final Optional<ByteSource> stream = taskLogStreamer.streamTaskLog(taskid, offset); final Optional<ByteSource> stream = taskLogStreamer.streamTaskLog(taskid, offset);
if (stream.isPresent()) { if (stream.isPresent()) {
try(InputStream istream = stream.get().openStream()) { return Response.ok(stream.get().openStream()).build();
return Response.ok(istream).build();
}
} else { } else {
return Response.status(Response.Status.NOT_FOUND) return Response.status(Response.Status.NOT_FOUND)
.entity( .entity(