From 12f8ed213a5ad4b844ab68020192b0c9e9215f23 Mon Sep 17 00:00:00 2001 From: John Furrow Date: Thu, 8 Jun 2017 20:23:33 -0700 Subject: [PATCH] Add comment about method call indices in #removeTorrents --- server/services/clientRequestService.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/services/clientRequestService.js b/server/services/clientRequestService.js index 31e3dd0a..6e5284eb 100644 --- a/server/services/clientRequestService.js +++ b/server/services/clientRequestService.js @@ -52,8 +52,10 @@ class ClientRequestService extends EventEmitter { // remove them. if (options.deleteData) { // We offset the indices of these method calls so that we know exactly - // where to retrieve them in the future. + // where to retrieve the responses in the future. const directoryBaseMethodCallIndex = index + options.hashes.length; + // We also need to ensure that the erase method call occurs after + // our request for information. eraseFileMethodCallIndex = index + options.hashes.length * 2; accumulator[index] = {