summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/web_surfaces/shared/channel.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/share/web_surfaces/shared/channel.js b/share/web_surfaces/shared/channel.js
index 21c23b6cac..8f4a178a7c 100644
--- a/share/web_surfaces/shared/channel.js
+++ b/share/web_surfaces/shared/channel.js
@@ -28,11 +28,16 @@ export class Channel {
open () {
return new Promise((resolve, reject) => {
this.socket = new WebSocket(`ws://${this.host}`);
+ this.socket.onclose = () => this.closeCallback();
this.socket.onerror = (error) => this.errorCallback(error);
this.socket.onmessage = (event) => this._onMessage(event);
this.socket.onopen = resolve;
});
}
+
+ closeCallback () {
+ // empty
+ }
errorCallback (error) {
// empty