onebots 0.0.12 → 0.0.13
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.
package/lib/service/V11/index.js
CHANGED
|
@@ -127,12 +127,12 @@ class V11 extends events_1.EventEmitter {
|
|
|
127
127
|
this.logger.error(err.message);
|
|
128
128
|
});
|
|
129
129
|
this.wss.on("connection", (ws, req) => {
|
|
130
|
-
this.logger.info(`ws客户端(${req.
|
|
130
|
+
this.logger.info(`ws客户端(${req.url})已连接`);
|
|
131
131
|
ws.on("error", (err) => {
|
|
132
|
-
this.logger.error(`ws客户端(${req.
|
|
132
|
+
this.logger.error(`ws客户端(${req.url})报错:${err.message}`);
|
|
133
133
|
});
|
|
134
134
|
ws.on("close", (code, reason) => {
|
|
135
|
-
this.logger.warn(`ws客户端(${req.
|
|
135
|
+
this.logger.warn(`ws客户端(${req.url})连接关闭,关闭码${code},关闭理由:` + reason);
|
|
136
136
|
});
|
|
137
137
|
if (this.config.access_token) {
|
|
138
138
|
const url = new url_1.URL(req.url, "http://127.0.0.1");
|
package/lib/service/V12/index.js
CHANGED
|
@@ -162,12 +162,12 @@ class V12 extends events_1.EventEmitter {
|
|
|
162
162
|
this.logger.error(err.message);
|
|
163
163
|
});
|
|
164
164
|
this.wss.on("connection", (ws, req) => {
|
|
165
|
-
this.logger.info(`ws客户端(${req.
|
|
165
|
+
this.logger.info(`ws客户端(${req.url})已连接`);
|
|
166
166
|
ws.on("error", (err) => {
|
|
167
|
-
this.logger.error(`ws客户端(${req.
|
|
167
|
+
this.logger.error(`ws客户端(${req.url})报错:${err.message}`);
|
|
168
168
|
});
|
|
169
169
|
ws.on("close", (code, reason) => {
|
|
170
|
-
this.logger.warn(`ws客户端(${req.
|
|
170
|
+
this.logger.warn(`ws客户端(${req.url})连接关闭,关闭码${code},关闭理由:` + reason);
|
|
171
171
|
});
|
|
172
172
|
if (config.access_token) {
|
|
173
173
|
const url = new url_1.URL(req.url, "http://127.0.0.1");
|