Skip to content

Commit

Permalink
add 10millisec
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 27, 2024
1 parent 206e951 commit c45e59b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ func (s *DispersalServer) disperseBlob(ctx context.Context, blob *core.Blob, aut
}

requestedAt := uint64(time.Now().UnixNano())
metadataKey, err := s.blobStore.StoreBlob(ctx, blob, requestedAt)
badContext, _ := context.WithTimeout(ctx, 5*time.Millisecond)

Check failure on line 283 in disperser/apiserver/server.go

View workflow job for this annotation

GitHub Actions / Linter

lostcancel: the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak (govet)
metadataKey, err := s.blobStore.StoreBlob(badContext, blob, requestedAt)
if err != nil {
for _, param := range securityParams {
quorumId := string(param.QuorumID)
Expand Down

0 comments on commit c45e59b

Please sign in to comment.