mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-09 17:45:03 +09:00
Add send request sync
This commit is contained in:
parent
febbdfa09b
commit
51f740cb90
3 changed files with 33 additions and 1 deletions
|
@ -2,6 +2,8 @@ package synctest
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"storj.io/drpc"
|
||||
|
||||
|
@ -25,6 +27,10 @@ func (c *CounterRequestSender) SendStreamRequest(ctx context.Context, rq syncdep
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return receive(stream)
|
||||
err = receive(stream)
|
||||
if errors.Is(err, io.EOF) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue