1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

cleanup waitfunc

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2016-02-10 22:09:43 -08:00
parent e8f48f1a1e
commit 58cba8af28

View File

@ -172,14 +172,10 @@ func PutRecordToRouting(ctx context.Context, k ci.PrivKey, value path.Path, seqn
func waitOnErrChan(ctx context.Context, errs chan error) error {
select {
case err := <-errs:
if err != nil {
return err
}
case <-ctx.Done():
return ctx.Err()
}
return nil
}
func PublishPublicKey(ctx context.Context, r routing.IpfsRouting, k key.Key, pubk ci.PubKey) error {