dont try sending a keepalive if the transport is down
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 30 Jun 2009 02:17:05 +0000 (12:17 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 27 Jul 2009 03:08:41 +0000 (13:08 +1000)
server/ctdb_call.c

index 0c4c60229304036773cd394318d04b0fd6ed425b..b666a9ed1bc80d58d4467578e9bab457743c29f6 100644 (file)
@@ -768,6 +768,11 @@ void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode)
 {
        struct ctdb_req_keepalive *r;
        
+       if (ctdb->methods == NULL) {
+               DEBUG(DEBUG_ERR,(__location__ " Failed to send keepalive. Transport is DOWN\n"));
+               return;
+       }
+
        r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REQ_KEEPALIVE,
                                    sizeof(struct ctdb_req_keepalive), 
                                    struct ctdb_req_keepalive);