loleaflet/src/core/Socket.js | 4 ++++ 1 file changed, 4 insertions(+) New commits: commit 381badc3cb908c96fcef9259fccaa2e8ad76f6a8 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Apr 24 16:48:32 2016 -0400
loleaflet: Socket.connected() to report socket connection state Change-Id: Ib777f1af52dac518ceae7234334af4108943fc07 Reviewed-on: https://gerrit.libreoffice.org/24350 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index d2d1ca4..457ff75 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -30,6 +30,10 @@ L.Socket = L.Class.extend({ this.socket.close(); }, + connected: function() { + return this.socket && this.socket.readyState === 1; + }, + sendMessage: function (msg, coords) { if (!msg.startsWith('useractive') && !msg.startsWith('userinactive') && !this._active) { // Avoid communicating when we're inactive. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits