gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-webextension] 74/95: check status not response text


From: gnunet
Subject: [reclaim-webextension] 74/95: check status not response text
Date: Fri, 11 Jun 2021 23:35:59 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository reclaim-webextension.

commit d5b0293a02cfe4b5e1bb68604b192df2d460dd31
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Dec 11 20:34:58 2020 +0900

    check status not response text
---
 scripts/gnunet.js | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/scripts/gnunet.js b/scripts/gnunet.js
index 099b5fb..884285f 100644
--- a/scripts/gnunet.js
+++ b/scripts/gnunet.js
@@ -5,15 +5,12 @@ function check_reclaim() {
 
   xmlHttp.onreadystatechange = function() {
     if (xmlHttp.readyState == XMLHttpRequest.DONE) {
-      var resp = xmlHttp.responseText;
+      var resp = xmlHttp.status;
 
-      var re = new RegExp('^\\[[a-zA-Z0-9"{}: ,]*\\]$');
-      var OK = re.test(resp);
-
-      if (!OK) {
+      if (200 != resp) {
         var reclaim_alive = false;
         chrome.storage.local.set({reclaim_alive}, function() {});
-        console.log("reclaim down");
+        console.log("reclaim down (ret=" + resp + ")");
       } else {
         var reclaim_alive = true;
         chrome.storage.local.set({reclaim_alive}, function() {});

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]