Alerting all users is done from different contexts.
One such is when loading a new document.
Since both alerting all users and loading documents
need to hold the same lock, this would deadlock.
The solution here is to differentiate between
external alerts and internal ones (to WSD).
The internal one expects to be invoked while holding
the lock, while the external one always takes the lock.
Care should be taking when alerting from within WSD to
avoid this deadlock.
Change-Id: Idf0e952db1216a3d161f22c7da51af16701f685b
Reviewed-on: https://gerrit.libreoffice.org/31102
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Only enabled in debug build. Default values for base delay is
10ms and jitter 5ms.
Override using LOOL_WS_DELAY, LOOL_WS_JITTER env. variables
Change-Id: I50502613075d6f73365623b93eb17748fe96fcc3
It was written in one conditional branch and was read in an other
conditional branch. So make sure no uninitialized data is read.
Change-Id: I230c6a4d3b048ee9d7f96881baf00eb041204ff0
Amazingly, this (my third attempt) seems to work.
Add a boolean 'forAllClients' parameter to the loleafget getPreview()
function, and pass it as true in the location where a new preview of
an edited slide is requested.
Add a parameter 'broadcast' to the 'tile' (request) message. Set to
'yes' in the above case. When subscribing to a such tile rendering,
subscribe all sessions of the document.
While at it, drop the default values for the parameters of the
TileDesc constructor. I dislike default values...
Change-Id: Idb438f11c953d791fafe4c890e0497d8dfbaa733
Reviewed-on: https://gerrit.libreoffice.org/29591
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Users aren't bothered with connection errors when inactive.
Instead, when they try to re-activate, the connection is
re-established, and only if that is not possible does
the user see the disconnection notice. Otherwise,
the connection is re-established semi-transparently
(the is a small "connecting" status shown at the bottom).
Change-Id: If4735cc1593c6e29c65d3c9686a8f2861365c583
Reviewed-on: https://gerrit.libreoffice.org/31026
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This leads to emission of 'docsize' event somewhere down the line
which leads inconsistencies while navigating the document.
Change-Id: Iffabac66153e7b32c9b2af041282ef82b813bef3
More flexible reason message and other cleanups
to help use altertAllUsers in other situations.
Change-Id: I7f0c7b5ac21ffa55923f531d7b28f7537ef42dac
Reviewed-on: https://gerrit.libreoffice.org/30997
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
'status' message can well be sent after document has already been
loaded. Eg: when the doc size is changed. We don't want this code
to execute in all such cases.
Change-Id: Ia69ab70edddda1a4e27618101eaff35bd0e5eb65
This also introduced a regression where upon reconnection of the
document, tiles were not updated. This was because calling
setView leads to calling 'canceltiles' down the line which would
cancel the the 'tilecombine' request for fetching all tiles
leading to stale tiles in the UI
Change-Id: Ib0f583c92802195384ea10f328c0ba2eafc82ffd
The current test tests if the embedded doc url recieved in websocket
URI endpoint is encoded or not.
Change-Id: I1e5d6639d6791be4e1e56701a9e444e33fc89aa2