Git Product home page Git Product logo

Comments (6)

kelindar avatar kelindar commented on June 12, 2024

I think that might be a different issue, the other bug was about when an entire peer goes down. Normal presence should work as expected. @Florimond could you verify?

from emitter.

Florimond avatar Florimond commented on June 12, 2024

@IliasP91 I was about to say it works properly according to my tests both on latest and edge as well as by running Emitter in VS Code. Then I managed to reproduce the issue once on docker lastest, but never again. Do you have a way to reproduce the issue consistently?

from emitter.

IliasP91 avatar IliasP91 commented on June 12, 2024

hi guys, ill try to create a small solution that reproduces the issue, ill keep you updated

from emitter.

IliasP91 avatar IliasP91 commented on June 12, 2024

hmm very interesting, just created a demo proj and attempted to recreate this, it worked fine as v2.8 whereas before it was not raising an unsubscribe event if I just closed a client console app. Now it does. Could it be that something has changed in the last 2 weeks on the latest branch/docker build?

Regardless here are the repro steps and the demo repo:
https://github.com/IliasP91/emitter-io-subscription-issue-repro

Repro steps:
Create a new docker instance with the latest image
docker run -d --name emitter-latest -p 8080:8080 -e EMITTER_LICENSE=PfA8IEfJReKdp2pWUOw_MVsWWUsaPdPhV79_C75M85nEsaz3ECnmNla4j_G8Ph8dkLpJkSH-5sqjDrG13OMLAQ:3 --restart=unless-stopped emitter/server:latest

Create a read,write,presence key on the new instance for channel 'test/'
Copy key to both console apps

Build and run Run.bat

Close one of the 5 opened clients
Type something on the broadcaster and press enter to invoke a presence request and see the list of connected clients

Feel free to close this if you think it doesnt require further investigation

from emitter.

Florimond avatar Florimond commented on June 12, 2024

I reproduced a similar behavior when I subscribe twice to the same channel with the same client. There is a counter that is incremented twice, and the other clients are only notified of a disconnection if this counter is at 0. But since, by exiting the program, you only produce one disconnection event, the counter is still greater than 0, and the other clients are never notified.

I'll discuss the issue with @kelindar to make sure I understand what was the intention behind this piece of code and fix it properly.

from emitter.

Florimond avatar Florimond commented on June 12, 2024

@IliasP91

This commit should fix your issue: 9e628aa

Don't hesitate to test and confirm the fix. Closing the issue for now.

from emitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.