mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
bump dep version
This commit is contained in:
1 parent
7b34eaebb2
commit
54a97b51d5
13 files changed
+34
-35
No files matched your search
@@ -261,13 +261,13 @@ export default class Hydro {
|
||||
: '{"key":"ping"}';
|
||||
setInterval(() => this.ws.send(content), 30000);
|
||||
});
|
||||
this.ws.on('message', (data) => {
|
||||
const request = JSON.parse(data.toString());
|
||||
this.ws.on('message', (data, isBinary) => {
|
||||
const request = JSON.parse(isBinary ? data : data.toString());
|
||||
if (request.language) this.language = request.language;
|
||||
if (request.task) queue.push(new JudgeTask(this, request.task, this.ws));
|
||||
});
|
||||
this.ws.on('close', (data, reason) => {
|
||||
log.warn(`[${this.config.host}] Websocket 断开:`, data, reason);
|
||||
log.warn(`[${this.config.host}] Websocket 断开:`, data, reason.toString());
|
||||
setTimeout(() => this.retry(queue), 30000);
|
||||
});
|
||||
this.ws.on('error', (e) => {
|
||||
|
||||
Reference in new issue
Block a user