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 }