eclipse-thingweb / eclipse-thingweb/node-wot

emitPropertyChange merges payloads - race condition?

Open
#1,231 1 comment 0 reactions 0 assignees View on GitHub
binding-http bug
Dominant language
TypeScript
Stars
192
Forks
100
Avg merge
3d 2h
Merged PRs (30d)
6

Description

> 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.