vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17439: LJSUP-6916: verify db connection.

Committer: vsukhanov
LJSUP-6916: verify db connection.
U   trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2010-09-23 08:56:02 UTC (rev 17438)
+++ trunk/cgi-bin/LJ/Entry.pm	2010-09-23 10:40:57 UTC (rev 17439)
@@ -1934,6 +1934,11 @@
     }
 
     my $dbr = LJ::get_cluster_reader($u);
+    unless ($dbr){
+        warn "Can't connect to cluster reader. Cluster: " . $u->clusterid;
+        return 0;
+    }
+
     my $jid = $u->{'userid'}+0;
     my $field = $u->{'journaltype'} eq "P" ? "revttime" : "rlogtime";
 

Tags: livejournal, pm, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments