Skip to content

Commit

Permalink
Retry if embed is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikidepia committed Jan 25, 2024
1 parent 35bb060 commit 256f5f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func getData(postID string, p *fastjson.Parser) (*fastjson.Value, error) {
var err error
for retries := 0; retries < 3; retries++ {
err := client.DoTimeout(req, res, timeout)
if err == nil {
if err == nil && len(res.Body()) > 0 {
break
}
}
Expand Down

0 comments on commit 256f5f4

Please sign in to comment.