This commit is contained in:
parent
6590da5793
commit
b5bdae4611
13
core/app.js
13
core/app.js
@ -66,7 +66,13 @@ exports.app_socket = async function socket(request, response) {
|
|||||||
try {
|
try {
|
||||||
message = JSON.parse(event.data);
|
message = JSON.parse(event.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print('WebSocket error:', error, event.data, event.data.length, event.opCode);
|
print(
|
||||||
|
'WebSocket error:',
|
||||||
|
error,
|
||||||
|
event.data,
|
||||||
|
event.data.length,
|
||||||
|
event.opCode
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!process && message.action == 'hello') {
|
if (!process && message.action == 'hello') {
|
||||||
@ -139,7 +145,7 @@ exports.app_socket = async function socket(request, response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (process) {
|
if (process) {
|
||||||
process.client_api.tfrpc = function(message) {
|
process.client_api.tfrpc = function (message) {
|
||||||
if (message.id) {
|
if (message.id) {
|
||||||
let calls = process?.app?.calls;
|
let calls = process?.app?.calls;
|
||||||
if (calls) {
|
if (calls) {
|
||||||
@ -155,7 +161,8 @@ exports.app_socket = async function socket(request, response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
process.app._on_output = (message) => response.send(JSON.stringify(message), 0x1);
|
process.app._on_output = (message) =>
|
||||||
|
response.send(JSON.stringify(message), 0x1);
|
||||||
process.app.send();
|
process.app.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ async function getProcessBlob(blobId, key, options) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
process.client_api = {
|
process.client_api = {
|
||||||
createIdentity: function() {
|
createIdentity: function () {
|
||||||
return process.createIdentity();
|
return process.createIdentity();
|
||||||
},
|
},
|
||||||
resetPermission: async function resetPermission(message) {
|
resetPermission: async function resetPermission(message) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user