guan404ming commented on code in PR #69302:
URL: https://github.com/apache/airflow/pull/69302#discussion_r3608456024


##########
ts-sdk/src/coordinator/log-channel.ts:
##########
@@ -99,7 +114,12 @@ export class LogChannel {
       event: `[${this.name}] ${record.event}`,
       timestamp: record.timestamp ?? new Date().toISOString(),
     });
-    this.sock.write(Buffer.from(line + "\n", "utf8"));
+    const payload = line + "\n";
+    if (!this.shared.connected) {
+      process.stderr.write(payload);
+      return;
+    }
+    this.shared.sock.write(Buffer.from(payload, "utf8"));

Review Comment:
   Good point, I do not cover the case when implementation. `send()` now also 
checks `sock.writable` and falls back to stderr in that window. Test added.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to