node-wot
node-wot copied to clipboard
emitPropertyChange merges payloads - race condition?
That would mean that when emitPropertyChange is called both if statements are true:
Just to be precise, it is the emitEvent that is the issue.
I am only sending a GET request from the browser to localhost:8081/coffee-machine/events/resourceEmpty and if both conditions are met, I get "water""beans"
. Both payloads are somehow merged into one since they are emitted very quickly. I should have gotten only "water"
since the browser will not send another GET before the other event could be emitted.
Originally posted by @egekorkan in https://github.com/eclipse-thingweb/node-wot/issues/1229#issuecomment-1935584456