Skip to content

Commit 0526621

Browse files
committedMar 21, 2024·
Log entire stdout and stderr for terminated backend worker process
1 parent 3694b11 commit 0526621

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎frontend/server/src/main/java/org/pytorch/serve/wlm/WorkerLifeCycle.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ public void terminate() {
380380
@Override
381381
public void run() {
382382
try (Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name())) {
383-
while (isRunning.get() && scanner.hasNext()) {
383+
while (scanner.hasNext()) {
384384
String result = scanner.nextLine();
385-
if (result == null) {
385+
if (result == null && !isRunning.get()) {
386386
break;
387387
}
388388

0 commit comments

Comments
 (0)