Code Monkey home page Code Monkey logo

Comments (4)

thedevop avatar thedevop commented on June 5, 2024 1

Thanks @donstephan for reporting this!

The issue is *system.Info was passed into hooks, and in the Redis hook, it directly dereferenced the live info:

.

I have provided a fix in PR #365, please verify.

from server.

donstephan avatar donstephan commented on June 5, 2024

Issue is here:

go s.eventLoop() // spin up event loop for issuing $SYS values and closing server.

go s.eventLoop() starts and the the s.publishSysTopics() runs right after it which could race with channels in the event loop. Would be very rare (if not impossible) to hit. If I'm reading it right, you'd somehow need a pause of 1 second between those two function executions to encounter this condition. Easiest fix is to just move the s.publishSysTopics() into the eventLoop() function so it runs before it listens to the tickers. Or it could just be moved above the eventLoop() execution in the server file.

from server.

donstephan avatar donstephan commented on June 5, 2024

Looks great. Tested the PR with the redis example and no more race. Thank you much!

from server.

thedevop avatar thedevop commented on June 5, 2024

@donstephan , this is incorporated into v2.4.6.

from server.

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.