Skip to content

Commit

Permalink
fix:close ask/dealstatus stream (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
hunjixin authored May 11, 2022
1 parent a088d71 commit f88ff91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storagemarket/impl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func (c *Client) GetAsk(ctx context.Context, info storagemarket.StorageProviderI
if err != nil {
return nil, xerrors.Errorf("failed to open stream to miner: %w", err)
}
defer s.Close() //nolint

request := network.AskRequest{Miner: info.Address}
if err := s.WriteAskRequest(request); err != nil {
Expand Down Expand Up @@ -269,6 +270,7 @@ func (c *Client) GetProviderDealState(ctx context.Context, proposalCid cid.Cid)
if err != nil {
return nil, xerrors.Errorf("failed to open stream to miner: %w", err)
}
defer s.Close() //nolint

buf, err := cborutil.Dump(&deal.ProposalCid)
if err != nil {
Expand Down

0 comments on commit f88ff91

Please sign in to comment.