File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ export class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
37
37
// There is one mild concern here, being that if users periodically and unboundedly create new clients, we will
38
38
// create more and more intervals, which may leak memory. In these situations, users are required to
39
39
// call `client.close()` in order to dispose of the client resource.
40
+ // Users are already confronted with the same reality with the SessionFlusher at the time of writing this so the
41
+ // working theory is that this should be fine.
42
+ // Note: We have experimented with using `FinalizationRegisty` to clear the interval when the client is garbage
43
+ // collected, but it did not work, because the cleanup function never got called.
40
44
this . _clientReportInterval = setInterval ( ( ) => {
41
45
DEBUG_BUILD && logger . log ( 'Flushing client reports based on interval.' ) ;
42
46
this . _flushOutcomes ( ) ;
You can’t perform that action at this time.
0 commit comments