-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers

Description
Describe the bug
I am trying to terminate all connections with socket After I logout. when I logging out connection is disconnecting but I still receiving message from "ReceiveMessage" method. Is there any idea what
is wrong with code?
my code seems below
initConnection() {
this.connection = new signalR.HubConnectionBuilder()
.withUrl("/chat", {
accessTokenFactory: () => {
return token;
}
})
.withAutomaticReconnect([0, 1000, 2000, 3000, 5000, 9000, 15000])
.build();
}
Tasks(){
this.connection.on("ReceiveMessage", this.ReceiveMessage);
}
async Disconnect(){
this.connection.off("ReceiveMessage", this.ReceiveMessage);
this.connection.stop().then(() => {
delete this.connection
}).catch(console.log);
}
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers