diff --git a/src/driver/freenas/http/api.js b/src/driver/freenas/http/api.js index 79d7311..596b973 100644 --- a/src/driver/freenas/http/api.js +++ b/src/driver/freenas/http/api.js @@ -66,7 +66,8 @@ class Api { // crude stoppage attempt let response = await httpClient.get(endpoint, queryParams); if (lastReponse) { - if (JSON.stringify(lastReponse) == JSON.stringify(response)) { + // Compare only the response body to avoid circular reference issues + if (JSON.stringify(lastReponse.body) == JSON.stringify(response.body)) { break; } } diff --git a/src/driver/freenas/ssh.js b/src/driver/freenas/ssh.js index 18c9e30..3c6040e 100644 --- a/src/driver/freenas/ssh.js +++ b/src/driver/freenas/ssh.js @@ -252,7 +252,8 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver { // crude stoppage attempt let response = await httpClient.get(endpoint, queryParams); if (lastReponse) { - if (JSON.stringify(lastReponse) == JSON.stringify(response)) { + // Compare only the response body to avoid circular reference issues + if (JSON.stringify(lastReponse.body) == JSON.stringify(response.body)) { break; } }