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


##########
ts-sdk/src/coordinator/log-channel.ts:
##########
@@ -120,8 +140,13 @@ export class LogChannel {
 
   async close(): Promise<void> {
     if (!this.isRoot) return;
+    this.shared.closed = true;
+    if (!this.shared.connected) {
+      this.shared.sock.destroy();
+      return;
+    }
     return new Promise((resolve) => {
-      this.sock.end(() => resolve());
+      this.shared.sock.end(() => resolve());

Review Comment:
   This may never resolve if the graceful `end()` never completes its flush 
(e.g. the socket errors). Maybe we can add a timeout here to ensure things 
always continue on?



-- 
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