Skip to content

Commit

Permalink
Fix bufio long line problem in judge.Client
Browse files Browse the repository at this point in the history
  • Loading branch information
mraron committed Apr 10, 2024
1 parent 2fe25b9 commit 82679bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/judge/judge.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package judge

import (
"bufio"
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"github.com/karrick/gobls"
"github.com/mraron/njudge/pkg/language"
"github.com/mraron/njudge/pkg/language/sandbox"
"github.com/mraron/njudge/pkg/problems"
Expand Down Expand Up @@ -134,7 +134,7 @@ func (c Client) Judge(ctx context.Context, sub Submission, callback ResultCallba
return nil, err
}

s := bufio.NewScanner(resp.Body)
s := gobls.NewScanner(resp.Body)
var res Result
for s.Scan() {
if err2 := json.Unmarshal(s.Bytes(), &res); err2 != nil {
Expand Down

0 comments on commit 82679bd

Please sign in to comment.