From 60c76f4a97df627046f0555e286c113530020d6a Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Sun, 8 Jan 2023 10:59:36 +0100 Subject: [PATCH] chore: remove unused code --- .../source/data/datasource/websocket.mjs | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/application/source/data/datasource/websocket.mjs b/application/source/data/datasource/websocket.mjs index 241307032..7b604dc03 100644 --- a/application/source/data/datasource/websocket.mjs +++ b/application/source/data/datasource/websocket.mjs @@ -206,52 +206,6 @@ class WebSocketDatasource extends Datasource { }; - // const self = this; - // let response; - // - // if (self[webConnectSymbol]?.socket?.readyState !== 1) { - // return Promise.reject('The connection is not established.'); - // } - // - // return new Promise((resolve, reject) => { - // if (self[receiveQueueSymbol].isEmpty()) { - // resolve(); - // } - // - // while (!self[receiveQueueSymbol].isEmpty()) { - // - // const event = self[receiveQueueSymbol].poll(); - // const body = event?.data; - // if (!body) continue; - // - // let obj; - // try { - // obj = JSON.parse(body); - // } catch (e) { - // - // let msg = 'the response does not contain a valid json (actual: '; - // - // if (body.length > 100) { - // msg += body.substring(0, 97) + '...'; - // } else { - // msg += body; - // } - // - // msg += "; " + e.message + ')'; - // - // reject(msg); - // return; - // } - // - // obj = self.transformServerPayload.call(self, obj); - // - // - // self.set(obj); - // return response; - // } - // }) -//} - /** * This prepares the data that comes from the server. * Should not be called directly. -- GitLab