MCPcopy Create free account
hub / github.com/DOSNetwork/core / waitForResult

Method waitForResult

p2p/request.go:45–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func (r *p2pRequest) waitForResult() (res interface{}, err error) {
46 select {
47 case <-r.ctx.Done():
48 err = r.ctx.Err()
49 case result := <-r.reply:
50 res = result.res
51 err = result.err
52 }
53 r.cancel()
54 return
55}
56
57func (r *p2pRequest) replyResult(res interface{}, err error) {
58 r.once.Do(func() {

Callers 2

RequestMethod · 0.80
ReplyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected