Skip to content

Commit

Permalink
fix a segfault when passing on requestCrawl fails
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Nov 22, 2024
1 parent aff0005 commit 8eb0d80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bgs/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,12 @@ func (s *BGS) handleComAtprotoSyncRequestCrawl(ctx context.Context, body *comatp
pu := rpu.JoinPath("/xrpc/com.atproto.sync.requestCrawl")
response, err := s.httpClient.Post(pu.String(), "application/json", bytes.NewReader(bodyBlob))
if err != nil {
log.Warnw("requestCrawl forward failed", "err", err)
log.Warnw("requestCrawl forward failed", "host", rpu, "err", err)
} else if response.StatusCode != http.StatusOK {
log.Warnw("requestCrawl forward failed", "status", response.Status)
log.Warnw("requestCrawl forward failed", "host", rpu, "status", response.Status)
} else {
log.Infow("requestCrawl forward successful", "host", rpu)
}
log.Infow("requestCrawl forward successful", "host", rpu, "status", response.Status)
}
}(blob)
}
Expand Down

0 comments on commit 8eb0d80

Please sign in to comment.