Skip to content

Commit 1a47ce5

Browse files
authored
port stream fix (#4600)
1 parent 7a7b3bf commit 1a47ce5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

share/shwap/p2p/shrex/client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"github.com/celestiaorg/go-libp2p-messenger/serde"
1616

17+
"github.com/celestiaorg/celestia-node/libs/utils"
1718
shrexpb "github.com/celestiaorg/celestia-node/share/shwap/p2p/shrex/pb"
1819
)
1920

@@ -84,6 +85,9 @@ func (c *Client) doRequest(
8485
if err != nil {
8586
return statusOpenStreamErr, fmt.Errorf("open stream: %w", err)
8687
}
88+
defer func() {
89+
utils.CloseAndLog(log, "shrex/client stream", stream)
90+
}()
8791

8892
c.setStreamDeadlines(ctx, logger, stream)
8993

0 commit comments

Comments
 (0)