uranusjr commented on code in PR #69302:
URL: https://github.com/apache/airflow/pull/69302#discussion_r3608497146
##########
ts-sdk/src/coordinator/log-channel.ts:
##########
@@ -120,8 +142,20 @@ 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());
+ const timer = setTimeout(() => {
+ this.shared.sock.destroy();
+ resolve();
+ }, CLOSE_FLUSH_TIMEOUT_MS);
Review Comment:
We can add a `timer.unref()` to avoid the process not being closed before
the timer fires. (Since we’re just cleaning up, the timer does not need to fire
if the process is dying anyway.) Not a big deal.
--
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]