In main.ts, a process exit handler is registered that logs via this.info()/this.error() when the server process exits.
During shutdown in client.ts, connection.exit() only sends the exit notification - it doesn't seem to actually wait for the process to actually terminate. The cleanUpChannel() call happens in the .finally() block right after, disposing _outputChannel and setting it to undefined.
If the process exits after this cleanup, the exit handler's logging calls hit the outputChannel getter which lazily creates a new output channel. This new channel is never disposed since we've already passed the cleanup phase.
In
main.ts, a process exit handler is registered that logs viathis.info()/this.error()when the server process exits.During shutdown in
client.ts,connection.exit()only sends the exit notification - it doesn't seem to actually wait for the process to actually terminate. ThecleanUpChannel()call happens in the .finally() block right after, disposing_outputChanneland setting it to undefined.If the process exits after this cleanup, the exit handler's logging calls hit the
outputChannelgetter which lazily creates a new output channel. This new channel is never disposed since we've already passed the cleanup phase.