Closed gurupras closed 4 years ago
First, sorry if this is a totally dumb question.
I've been running into some memory leaks recently, and an amateur attempt at a heap dump led me to this line of code. From the code below, I see that this._sockets (temporarily?) stores sockets that are amidst discovery. https://github.com/t-mullen/simple-signal/blob/ec5ff0fe9ee7e7a8bfd650f60bd47fa6e03c5017/server/src/index.js#L21-L24
this._sockets
but I can't seem to figure out where this._sockets is cleared out.
Does a socket disconnect somehow wipe it out? Am I somehow not releasing a reference to the sockets in my code that is in turn causing a pileup within SimpleSignalServer?
SimpleSignalServer
Yes, this is a leak. Fixed in v2.1.2
v2.1.2
First, sorry if this is a totally dumb question.
I've been running into some memory leaks recently, and an amateur attempt at a heap dump led me to this line of code. From the code below, I see that
this._sockets
(temporarily?) stores sockets that are amidst discovery. https://github.com/t-mullen/simple-signal/blob/ec5ff0fe9ee7e7a8bfd650f60bd47fa6e03c5017/server/src/index.js#L21-L24but I can't seem to figure out where
this._sockets
is cleared out.Does a socket disconnect somehow wipe it out? Am I somehow not releasing a reference to the sockets in my code that is in turn causing a pileup within
SimpleSignalServer
?