cgserver 6.2.8 → 6.2.9
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.
|
@@ -157,12 +157,12 @@ class IWebSocket {
|
|
|
157
157
|
try {
|
|
158
158
|
if (Core_1.core.isAsyncFunc(otherfunc)) {
|
|
159
159
|
//默认支持其他所有处理消息
|
|
160
|
-
await otherfunc(jsonData).catch((reason) => {
|
|
160
|
+
await otherfunc.call(jsonData).catch((reason) => {
|
|
161
161
|
Log_1.GLog.error(reason);
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
|
-
otherfunc(jsonData);
|
|
165
|
+
otherfunc.call(jsonData);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
catch (e) {
|
|
@@ -177,12 +177,12 @@ class IWebSocket {
|
|
|
177
177
|
try {
|
|
178
178
|
if (Core_1.core.isAsyncFunc(func)) {
|
|
179
179
|
//默认支持其他所有处理消息
|
|
180
|
-
await func(jsonData).catch((reason) => {
|
|
180
|
+
await func.call(jsonData).catch((reason) => {
|
|
181
181
|
Log_1.GLog.error(reason);
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
func(jsonData);
|
|
185
|
+
func.call(jsonData);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
catch (e) {
|
|
@@ -94,7 +94,7 @@ class BaseUserController extends BaseController_1.BaseController {
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
if (!this._session_id) {
|
|
97
|
-
this._session_id = Math.random().toString(36).
|
|
97
|
+
this._session_id = Math.random().toString(36).substring(2) + user.id;
|
|
98
98
|
}
|
|
99
99
|
let time = 0;
|
|
100
100
|
if (this._request.postData.remember == "on") {
|