• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Same notif received multiple time

Scheduled Pinned Locked Moved Troubleshooting
1 Posts 1 Posters 902 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    romain
    last edited by Jun 6, 2017, 1:36 PM

    I sometime receive the same notification multiple time, like if the mirror run my module twice or something. It’s not happening every time.
    As an example, I have a module that send a socket notification in the start function to the node helper to initialise something. let’s call it Notif_A.
    l catch it the notification, make sure it’s Notif_A with an if statement, and When the node helper did it’s job it send back the data he got. still with a send socket notification Let’s call it Notif_B.
    The odd thing is that I sometime got into the if that check if it received Notif_B twice in a row. Like if I got the notif twice.
    The thing is, I only send Notif_A in the start function And I only send Notif_B if I received Notif_A.

    I also noticed that the getDom function on some modules are callde 2 or 3 time in the raw at the begining (I checked with console.log)

    So… what’s happening here ? Why is the notification is catched twice ? Is the start function runned twice for some reason ?

    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post
    Enjoying MagicMirror? Please consider a donation!
    MagicMirror created by Michael Teeuw.
    Forum managed by Sam, technical setup by Karsten.
    This forum is using NodeBB as its core | Contributors
    Contact | Privacy Policy