Skip to content

Commit

Permalink
Merge pull request #302 from lf-lang/socket-termination
Browse files Browse the repository at this point in the history
Graceful termination of socket connections to the RTI
  • Loading branch information
byeonggiljun authored Aug 23, 2024
2 parents 324f12e + 434002b commit f5df4fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f5df4fa

Please sign in to comment.