Skip to content

Commit

Permalink
Fix expiration time for currTurnToken in InitTurnStile function
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhou26 committed Apr 20, 2024
1 parent e601663 commit 3afbbe2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
tag_name: v2.0.4
tag_name: v2.0.5
files: |
aurora-linux-amd64.tar.gz
aurora-windows-amd64.tar.gz
Expand Down
5 changes: 3 additions & 2 deletions internal/chatgpt/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"golang.org/x/crypto/sha3"
"math/rand"
"net/http"

"golang.org/x/crypto/sha3"

//http "github.com/bogdanfinn/fhttp"
"io"
"net/url"
Expand Down Expand Up @@ -280,7 +281,7 @@ func InitTurnStile(client httpclient.AuroraHttpClient, secret *tokens.Secret, pr
currTurnToken = &TurnStile{
TurnStileToken: result.Token,
Arkose: result.Arkose.Required,
ExpireAt: time.Now().Add(5 * time.Minute),
ExpireAt: time.Now().Add(1 * time.Second),
}
if result.Proof.Required == true {
currTurnToken.ProofOfWorkToken = CalcProofToken(result.Proof.Seed, result.Proof.Difficulty)
Expand Down

0 comments on commit 3afbbe2

Please sign in to comment.