Commit 63c8a9eb authored by Jeromy's avatar Jeromy

pass reference to reader instead of using the one on the object

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent 79e9bd84
......@@ -230,9 +230,9 @@ func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb
func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error {
errc := make(chan error, 1)
go func() {
errc <- ms.r.ReadMsg(mes)
}()
go func(r ggio.ReadCloser) {
errc <- r.ReadMsg(mes)
}(ms.r)
select {
case err := <-errc:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment