Skip to content

Commit

Permalink
SDK LRO Poller: Rest the result.HttpResponse.Body before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo committed Nov 26, 2024
1 parent 2c82270 commit 774530e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/client/resourcemanager/poller_lro.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func (p *longRunningOperationPoller) Poll(ctx context.Context) (result *pollers.
if parseError != nil {
return nil, parseError
}
result.HttpResponse.Body = io.NopCloser(bytes.NewReader(respBody))

err = pollers.PollingFailedError{
HttpResponse: result.HttpResponse,
Expand All @@ -206,6 +207,7 @@ func (p *longRunningOperationPoller) Poll(ctx context.Context) (result *pollers.
if parseError != nil {
return nil, parseError
}
result.HttpResponse.Body = io.NopCloser(bytes.NewReader(respBody))

err = pollers.PollingCancelledError{
HttpResponse: result.HttpResponse,
Expand Down

0 comments on commit 774530e

Please sign in to comment.