Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hub invocation callbacks are not cleaned up in JS client if no response is received causing a memory leak #2271

Closed
DamianEdwards opened this Issue Jul 8, 2013 · 2 comments

Comments

Projects
None yet
3 participants
Owner

DamianEdwards commented Jul 8, 2013

Note: This is the 2.0 version of #2270

There's a memory leak when the hub proxy never receives a valid response from the server as the callback isn't cleaned up from the global callbacks map. Suggested changes:

  • Hub invocation callbacks should be stored on the connection instance metadata member (connection._). Note it needs to be separate to the existing callback map on there used to store hub proxy client callbacks
  • For the transports that use Ajax sends, the fail delegate should clear the callback delegate
  • For WebSockets, the callback map for that connection should be completely cleared on the reconnect event
  • For all transports, the callback map for that connection should be completely cleared on the disconnect event

@ghost ghost assigned NTaylorMullen Jul 8, 2013

@ghost ghost assigned DamianEdwards Jul 19, 2013

Owner

DamianEdwards commented Jul 19, 2013

Fixed in 42c7575

@ghost ghost assigned gustavo-armenta Jul 19, 2013

Contributor

gustavo-armenta commented Jul 23, 2013

tested behavior is the same as in #2270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment