You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2013/10/14 19:43:20 UTC

svn commit: r1531995 - /spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/Redis.pm

Author: mmartinec
Date: Mon Oct 14 17:43:19 2013
New Revision: 1531995

URL: http://svn.apache.org/r1531995
Log:
Redis.pm: ignore error if an old redis server (e.g. 2.4) does not recognize a CLIENT SETNAME command

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/Redis.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/Redis.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/Redis.pm?rev=1531995&r1=1531994&r2=1531995&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/Redis.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/BayesStore/Redis.pm Mon Oct 14 17:43:19 2013
@@ -405,7 +405,12 @@ sub on_connect {
       chomp $@; die "Redis error: $@";
     }
   };
-  $r->call('CLIENT', 'SETNAME', 'sa['.$$.']');
+  eval {
+    $r->call('CLIENT', 'SETNAME', 'sa['.$$.']');
+  } or do {
+    dbg("bayes: CLIENT SETNAME command failed, don't worry, ".
+        "possibly an old redis version: %s", $@);
+  };
   1;
 }