deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
935 stars 166 forks source link

race-bug: webxdc status updates get received multiple times #3296

Closed Simon-Laux closed 1 year ago

Simon-Laux commented 1 year ago

when there are multiple status updates at the same time, sometimes they get send multiple times to the webxdc (also in wrong order?):

Bildschirmfoto 2023-07-01 um 19 13 40

It is probably that each update causes sending all new update from the update's serial onwards, we should fix this:

I found this while using the time tracking webxdc: https://github.com/webxdc/timetracking-webxdc/issues/15

ralphtheninja commented 1 year ago

Is updateListener function called from an event? If so, it could be the case that it has been registered multiple times.

Simon-Laux commented 1 year ago

Is updateListener function called from an event? If so, it could be the case that it has been registered multiple times.

I also suspected that, but I ruled it out with a log statement. Also I remembered: setUpdateListener only supports one listener on desktop and I also think on the mobile implementations. if that is not in the spec we should add it I guess.