Skip to content

Commit

Permalink
fix(judge): socket.io message body limit exceeded caused connection c…
Browse files Browse the repository at this point in the history
…lose
  • Loading branch information
Menci committed Mar 30, 2022
1 parent 2cf6a10 commit a7f4c40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/judge/judge.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ const REDIS_LOCK_JUDGE_CLIENT_CONNECT_DISCONNECT = "judge-client-connect-disconn

const REDIS_CHANNEL_CANCEL_TASK = "cancel-task";

@WebSocketGateway({ namespace: "judge", path: "/api/socket", transports: ["websocket"], parser: SocketIOParser })
@WebSocketGateway({
maxHttpBufferSize: 1e9,
namespace: "judge",
path: "/api/socket",
transports: ["websocket"],
parser: SocketIOParser
})
export class JudgeGateway implements OnGatewayConnection, OnGatewayDisconnect {
@WebSocketServer()
private server: Server;
Expand Down
1 change: 1 addition & 0 deletions src/submission/submission-progress.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ interface SubmissionProgressMessage {
// TODO: This should be refactored if we add hack, custom judge, etc
// Maybe refactor to a general "task progress"
@WebSocketGateway({
maxHttpBufferSize: 1e9,
namespace: "submission-progress",
path: "/api/socket",
transports: ["websocket"],
Expand Down

0 comments on commit a7f4c40

Please sign in to comment.