Commit graph

13 commits

Author SHA1 Message Date
Bruno Windels 00a85697ab add license header in all source files 2020-08-05 18:38:55 +02:00
Bruno Windels 24cb9e3f5c only increment sent counter after successful send
otherwise the message doesn't get sent after coming back online
2020-05-07 18:46:16 +02:00
Bruno Windels 001dbefbcf stop using default exports
because it becomes hard to remember where you used them and where not
2020-04-20 21:26:39 +02:00
Bruno Windels 8c56ac3e4f rename NetworkError to ConnectionError 2020-04-19 19:05:12 +02:00
Bruno Windels 8354c58c07 also look for remote echos based on event_id 2020-03-23 23:00:33 +01:00
Bruno Windels 7e8cc7ae00 need to return the response here, not the request wrapper
we were reading back a remote id of undefined because of this,
so when for some reason we never receive the message down from sync,
the pending message keeps sending on every load. The server ignores
the send though, because the transaction id is already used, and it returns
the remote id of the event that was already sent the previous time, but
as we were not storing this remote id, we'd just try again and again.

not receiving it through sync could have happened when we were sending a bunch of events
and then receiving (this is how we encountered this bug, while trying to repro another) the
response, but not yet the sync for the message that got wedged. Then we typed stuff on another client
so we would get a limited response for that room, and boom, we would not get the remote echo of the
event that was already sent (but because of this bug we didn't store the remote id) but no echo received yet (when we remove the pending event),
so it gets wedged!
2020-03-17 00:11:50 +01:00
Bruno Windels 2b2b4232e9 moar send logging 2019-09-15 12:25:14 +02:00
Bruno Windels b26f7df689 pending events are not certain to be sorted here 2019-07-29 09:54:34 +02:00
Bruno Windels 3ed72df620 put everything together to make it roughly work
no local echo yet, and send errors are being swallowed
2019-07-27 10:51:51 +02:00
Bruno Windels 707988f806 better handle remote echos and hookup in session and room 2019-07-26 22:33:33 +02:00
Bruno Windels ccb722d766 more WIP 2019-07-26 22:03:57 +02:00
Bruno Windels f3d1128f28 WIP 2019-07-01 10:00:29 +02:00
Bruno Windels c5b2d0c8b2 WIP 2019-06-28 00:52:54 +02:00