Merge pull request #2788 from ipfs/fix/buffer-err-chan

Fix/buffer err chan
This commit is contained in:
Jeromy Johnson 2016-06-01 13:28:35 -07:00
commit acd5765bb6

View File

@ -135,6 +135,9 @@ func checkCtxTTL(ctx context.Context) (time.Duration, bool) {
}
func PutRecordToRouting(ctx context.Context, k ci.PrivKey, value path.Path, seqnum uint64, eol time.Time, r routing.IpfsRouting, id peer.ID) error {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
namekey, ipnskey := IpnsKeysForID(id)
entry, err := CreateRoutingEntryData(k, value, seqnum, eol)
if err != nil {
@ -146,7 +149,7 @@ func PutRecordToRouting(ctx context.Context, k ci.PrivKey, value path.Path, seqn
entry.Ttl = proto.Uint64(uint64(ttl.Nanoseconds()))
}
errs := make(chan error)
errs := make(chan error, 2)
go func() {
errs <- PublishEntry(ctx, r, ipnskey, entry)