You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like some pointers on how to dispose and recreate the socket connection.
At the moment, in the AppModule I have SocketIoModule.forRoot(socketConfig), and a single page/component which uses a service which has the Socket class injected via it's contructor.
The service obviously stays around as soon as it's instantiated for the first time, by navigating to the page.
Does anyone have any advice or example code to dispose & recreate the socket?
Or another pattern like creating/disposing a new socket which follows the life-cycle of a component?
Cheers
The text was updated successfully, but these errors were encountered:
Hi,
I'd like some pointers on how to dispose and recreate the socket connection.
At the moment, in the
AppModule
I haveSocketIoModule.forRoot(socketConfig)
, and a single page/component which uses a service which has theSocket
class injected via it's contructor.The service obviously stays around as soon as it's instantiated for the first time, by navigating to the page.
Does anyone have any advice or example code to dispose & recreate the socket?
Or another pattern like creating/disposing a new socket which follows the life-cycle of a component?
Cheers
The text was updated successfully, but these errors were encountered: