From b1e0f78f5611ec3c3f6d68604f994bf4beb6235d Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Wed, 29 Apr 2020 17:57:38 -0400 Subject: [PATCH] fix: do not use hard coded IPNS Publish maximum timeout duration --- namesys/publisher.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/namesys/publisher.go b/namesys/publisher.go index 1fa0c96c9..f558eaf28 100644 --- a/namesys/publisher.go +++ b/namesys/publisher.go @@ -22,7 +22,6 @@ import ( const ipnsPrefix = "/ipns/" -const PublishPutValTimeout = time.Minute const DefaultRecordEOL = 24 * time.Hour // IpnsPublisher is capable of publishing and resolving names to the IPFS @@ -269,15 +268,10 @@ func PublishPublicKey(ctx context.Context, r routing.ValueStore, k string, pubk } // Store associated public key - timectx, cancel := context.WithTimeout(ctx, PublishPutValTimeout) - defer cancel() - return r.PutValue(timectx, k, pkbytes) + return r.PutValue(ctx, k, pkbytes) } func PublishEntry(ctx context.Context, r routing.ValueStore, ipnskey string, rec *pb.IpnsEntry) error { - timectx, cancel := context.WithTimeout(ctx, PublishPutValTimeout) - defer cancel() - data, err := proto.Marshal(rec) if err != nil { return err @@ -285,7 +279,7 @@ func PublishEntry(ctx context.Context, r routing.ValueStore, ipnskey string, rec log.Debugf("Storing ipns entry at: %s", ipnskey) // Store ipns entry at "/ipns/"+h(pubkey) - return r.PutValue(timectx, ipnskey, data) + return r.PutValue(ctx, ipnskey, data) } // InitializeKeyspace sets the ipns record for the given key to