@cryptotaxi247 / kubo / commits / ce0bf8036

core/commands/unixfs/ls: Replace TODO context with command context

Discussing this on IRC ([1] through [2]), Jeromy and I decided that we'd really like a way to configure per-command [3] and per-action timeouts, but until we have that we want to leave the minute limit here. We also decided that the use of TODO here instead of the per-command req.Context().Context was a bug, which I'm fixing with this commit. [1]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41714126&page=4 [2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41715618&page=4 [3]: https://github.com/ipfs/go-ipfs/issues/1325 License: MIT Signed-off-by: W. Trevor King <wking@tremily.us>

W. Trevor King committed Jun 13, 2015 at 12:50 UTC ce0bf803684aa48ee719a7279f1448060ae5f121
1 file changed +1 -1
core/commands/unixfs/ls.go
+1 -1
@@ -94,7 +94,7 @@ directories, the child size is the IPFS link size.
94 case unixfspb.Data_Directory:
95 output[i].Links = make([]LsLink, len(merkleNode.Links))
96 for j, link := range merkleNode.Links {
97 - getCtx, cancel := context.WithTimeout(context.TODO(), time.Minute)
97 + getCtx, cancel := context.WithTimeout(ctx, time.Minute)
98 defer cancel()
99 link.Node, err = link.GetNode(getCtx, node.DAG)
100 if err != nil {