diff --git a/lib/hk-util.js b/lib/hk-util.js index 81984b300..ccf8c4465 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -836,6 +836,9 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct) { if (isCp) { // id becomes either null or an array or results... id = CHECKPOINT_PATTERN.exec(msgStruct[4]); + // FIXME relying on this data to be stored on an in-memory structure + // managed by a dependency is fragile. We should put this somewhere + // more straightforward and reliable. if (Array.isArray(id) && id[2] && id[2] === channel.lastSavedCp) { // Reject duplicate checkpoints return; @@ -901,6 +904,8 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct) { // FIXME if (Array.isArray(id) && id[2]) { // Store new checkpoint hash + // there's a FIXME above which concerns a reference to `lastSavedCp` + // this is a hacky place to store important data. channel.lastSavedCp = id[2]; } }