From 1b0515d1d6849fc05d4182c98b485407d8f702af Mon Sep 17 00:00:00 2001 From: Byeonggil Jun <78055940+byeonggiljun@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:47:16 -0700 Subject: [PATCH] Close the socket to the RTI gracefully --- src/core/federation.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/federation.ts b/src/core/federation.ts index 3052074a..e956710b 100644 --- a/src/core/federation.ts +++ b/src/core/federation.ts @@ -552,13 +552,13 @@ class RTIClient extends EventEmitter { } /** - * Destroy the RTI Client's socket connection to the RTI. + * Close the RTI Client's socket connection to the RTI. */ public closeRTIConnection(): void { Log.debug(this, () => { - return "Closing RTI connection by destroying and unrefing socket."; + return "Closing RTI connection by ending and unrefing socket."; }); - this.socket?.destroy(); + this.socket?.end(); this.socket?.unref(); // Allow the program to exit }