GitHub user mike-jumper opened a pull request:
https://github.com/apache/incubator-guacamole-client/pull/143
GUACAMOLE-250: Export client state asynchronously
Guacamole's protocol state and display state are asynchronous with respect
to each other. A layer or buffer may have been deleted using a ["dispose"
instruction](http://guacamole.incubator.apache.org/doc/gug/protocol-reference.html#dispose-instruction),
for example, and thus cannot be referenced as far as the protocol is
concerned, yet still exist within the display because the display has not yet
flushed (it can be blocked by image decoding). This means that the current
implementation of `exportState()` will not always function correctly,
especially if the browser is decoding images slowly.
This change modifies `exportState()` such that it only returns the state
object asynchronously (through invoking a callback), and populates the protocol
and display portions of that state when they are available. A snapshot of
layers and buffers present with respect to the protocol is taken immediately,
and the data related to the layers and buffers in the snapshot is added to the
state object once the display is ready.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mike-jumper/incubator-guacamole-client
async-export
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-guacamole-client/pull/143.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #143
----
commit 9ba6a5f69b741a4eaa432a5856ebf42b2e7fd7ad
Author: Michael Jumper <[email protected]>
Date: 2017-04-14T03:41:12Z
GUACAMOLE-250: Export client state asynchronously (display state may not
match protocol state otherwise).
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---