Update variable name
This commit is contained in:
parent
6f8d5d09ef
commit
a1230c34eb
|
|
@ -184,14 +184,14 @@ export default class RFB extends EventTargetMixin {
|
||||||
this._sock.on('message', this._handle_message.bind(this));
|
this._sock.on('message', this._handle_message.bind(this));
|
||||||
this._sock.on('open', () => {
|
this._sock.on('open', () => {
|
||||||
if (typeof options.onSocketOpen === "function") {
|
if (typeof options.onSocketOpen === "function") {
|
||||||
let result;
|
let errorDescription;
|
||||||
try {
|
try {
|
||||||
result = options.onSocketOpen(this._sock._websocket);
|
errorDescription = options.onSocketOpen(this._sock._websocket);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return this._fail("onSocketOpen callback failed: " + e.stack);
|
return this._fail("onSocketOpen callback failed: " + e.stack);
|
||||||
}
|
}
|
||||||
if (result) {
|
if (errorDescription) {
|
||||||
return this._fail("onSocketOpen callback failed: " + result);
|
return this._fail("onSocketOpen callback failed: " + errorDescription);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue