Closed water-melon91 closed 5 years ago
Hey, I have got the same problem :D. You need to unsubscribe events in hubproxy: for example: if you have got
hubProxy.on("test", test)
then you need to remove it manually when you want to change page
hubProxy.off("test",test)
I normal signalR library there is enough to only do:
hubProxy = null
they should fix it
For me works:
hubProxy.connection.stop()
Full code:
const connection = hubConnection(yourHost);
const hubProxy = connection.createHubProxy(yourHubName);
hubProxy.connection.stop();
However I'm using TypeScript and I don't know why this method isn't typed.
i want to stop another page go i add self.mainconnection = hubConnection('http://'); self.hubProxy = self.mainconnection.createHubProxy('test');
ionViewWillLeave (){ self.mainconnection.stop(); self.hubProxy.connection.stop(); } but this not working how to try another way??