@cryptotaxi247 / kubo / commits / 82a221825

localize context cancellation in PutRecordToRouting

License: MIT Signed-off-by: Jeromy <why@ipfs.io>

Jeromy committed Jun 1, 2016 at 12:20 UTC 82a2218251127d85085dd68f64a6a0b3da5c99e6
1 file changed +3
namesys/publisher.go
+3
@@ -135,6 +135,9 @@ func checkCtxTTL(ctx context.Context) (time.Duration, bool) {
135 }
136
137 func PutRecordToRouting(ctx context.Context, k ci.PrivKey, value path.Path, seqnum uint64, eol time.Time, r routing.IpfsRouting, id peer.ID) error {
138 + ctx, cancel := context.WithCancel(ctx)
139 + defer cancel()
140 +
141 namekey, ipnskey := IpnsKeysForID(id)
142 entry, err := CreateRoutingEntryData(k, value, seqnum, eol)
143 if err != nil {