mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix #116 (problem_rejudge)
This commit is contained in:
1 parent
0e9fdca8cd
commit
b8e03f28ea
2 files changed
+5
-4
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.5.14",
|
"version": "2.5.15",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -231,9 +231,10 @@ export default class Hydro {
|
|||||||
this.ws.on('open', () => {
|
this.ws.on('open', () => {
|
||||||
this.ws.send(this.config.cookie);
|
this.ws.send(this.config.cookie);
|
||||||
global.onDestory.push(() => this.ws.close());
|
global.onDestory.push(() => this.ws.close());
|
||||||
setInterval(() => {
|
const content = this.config.minPriority !== undefined
|
||||||
this.ws.send(`{"key":"prio","prio":${this.config.minPriority || -50}}`);
|
? `{"key":"prio","prio":${this.config.minPriority}}`
|
||||||
}, 30000);
|
: '{"key":"ping"}';
|
||||||
|
setInterval(() => this.ws.send(content), 30000);
|
||||||
});
|
});
|
||||||
this.ws.on('message', (data) => {
|
this.ws.on('message', (data) => {
|
||||||
const request = JSON.parse(data.toString());
|
const request = JSON.parse(data.toString());
|
||||||
|
|||||||
Reference in new issue
Block a user