From b1cfea4f5203f367b944c90135d421c7ab4510d9 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 23 Jun 2023 03:43:06 +0200 Subject: [PATCH] fix(perf/go-libp2p): close write after sending in client (#205) Follow up to https://github.com/libp2p/test-plans/pull/184. --- perf/impl/go-libp2p/v0.27/perf.go | 1 + 1 file changed, 1 insertion(+) diff --git a/perf/impl/go-libp2p/v0.27/perf.go b/perf/impl/go-libp2p/v0.27/perf.go index 33d89835d..021abd2e4 100644 --- a/perf/impl/go-libp2p/v0.27/perf.go +++ b/perf/impl/go-libp2p/v0.27/perf.go @@ -73,6 +73,7 @@ func (ps *PerfService) RunPerf(ctx context.Context, p peer.ID, bytesToSend uint6 if err := sendBytes(s, bytesToSend); err != nil { return 0, 0, err } + s.CloseWrite() sendDuration := time.Since(sendStart) recvStart := time.Now()