Skip to content
Snippets Groups Projects
Commit 702b8946 authored by Anthony PERARD's avatar Anthony PERARD
Browse files

client: Prevent concurent sync loop

Currently, changes in network connectivity (notified via
matrix_network_changed_cb()) can lead libcmatrix to run
more than one sync task (red_pill) at a time. This happens
when cm_client_stop_sync() is called followed by several call
of cm_client_start_sync(). (and when filter_id is already set)

cm_client_start_sync() is supposed to prevent matrix_start_sync()
again when `is_sync` or `is_logging_in` is set, but nothing sets those
when matrix_take_red_pill() is called. `is_sync` is only set by the
callback, but that's too late.

So, we will set `is_logging_in` via client_set_login_state() when we
are restarting to sync with the server.

Fixes #14
parent 13fe2880
No related branches found
Tags v0.1.1
1 merge request!51client: Prevent concurent sync loop
Pipeline #87386 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment