@optimiser/common 1.0.246 → 1.0.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,12 +97,19 @@ var MemoryDBConnect = /** @class */ (function () {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
_this.client.on('data', function (data) {
|
|
100
|
+
console.log("Data from MemServer", (data || "").toString());
|
|
100
101
|
//console.log("")
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
message
|
|
102
|
+
var message = null;
|
|
103
|
+
try {
|
|
104
|
+
data = JSON.parse(data);
|
|
105
|
+
message = _this.messages[data.id];
|
|
106
|
+
if (message) {
|
|
107
|
+
delete _this.messages[data.id];
|
|
108
|
+
message(data);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.log("Error in parsing MemServer data", error);
|
|
106
113
|
}
|
|
107
114
|
});
|
|
108
115
|
_this.client.on('close', function () {
|