mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.5.14",
|
||||
"version": "2.5.15",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -231,9 +231,10 @@ export default class Hydro {
|
||||
this.ws.on('open', () => {
|
||||
this.ws.send(this.config.cookie);
|
||||
global.onDestory.push(() => this.ws.close());
|
||||
setInterval(() => {
|
||||
this.ws.send(`{"key":"prio","prio":${this.config.minPriority || -50}}`);
|
||||
}, 30000);
|
||||
const content = this.config.minPriority !== undefined
|
||||
? `{"key":"prio","prio":${this.config.minPriority}}`
|
||||
: '{"key":"ping"}';
|
||||
setInterval(() => this.ws.send(content), 30000);
|
||||
});
|
||||
this.ws.on('message', (data) => {
|
||||
const request = JSON.parse(data.toString());
|
||||
|
||||
Reference in new issue
Block a user