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
unsubscribe does not work as expected for the following code block
startListener(){if(!this.listenerFn){this.listenerFn=this.notification.connect();}}unsubscribeListener(){// Stop listening to notificationsif(this.listenerFn){this.listenerFn();console.log('Notification Service stopped');}
import{Client}from"appwrite";constclient=newClient().setEndpoint('https://cloud.appwrite.io/v1').setProject('<PROJECT_ID>');constunsubscribe=client.subscribe('files',response=>{// Callback will be executed on changes for all files.console.log(response);});// Closes the subscription.unsubscribe();
demo video:
👍 Expected behavior
it should close the websocket totally. i can see the network tab of inspector
👎 Actual Behavior
when i call unsubscribe, it doesnt trigger to and after logout it continues to listen.
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
MacOS
🧱 Your Environment
appwrite version 1.4.13
sdk for web "appwrite": "^13.0.0",
👀 Have you spent some time to check if this issue has been raised before?
@behics, thanks for creating this issue! 🙏🏼 Since we already have appwrite/appwrite#7584. It would be good to just use that 1 issue. Please make sure to add a 👍🏼 to that issue.
👟 Reproduction steps
unsubscribe does not work as expected for the following code block
doc ref:
demo video:
👍 Expected behavior
it should close the websocket totally. i can see the network tab of inspector
👎 Actual Behavior
when i call unsubscribe, it doesnt trigger to and after logout it continues to listen.
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
MacOS
🧱 Your Environment
appwrite version 1.4.13
sdk for web "appwrite": "^13.0.0",
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: