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 ...@@ -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 { func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error {
errc := make(chan error, 1) errc := make(chan error, 1)
go func() { go func(r ggio.ReadCloser) {
errc <- ms.r.ReadMsg(mes) errc <- r.ReadMsg(mes)
}() }(ms.r)
select { select {
case err := <-errc: 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