Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Oct 4, 2024
1 parent 5ecd2f7 commit f827952
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ export class Pty {
}

close() {
// end instead of destroy so that the user can read the last bits of data
// and allow graceful close event to mark the fd as ended
this.#socket.end();
}

Expand All @@ -136,7 +138,7 @@ export class Pty {
// exited but we don't know about it yet. In that case, we just ignore the error.
return;
}

// otherwise, rethrow
throw e;
}
Expand Down

0 comments on commit f827952

Please sign in to comment.