ctdb-tcp: Remove redundant restart in ctdb_tcp_tnode_cb()
authorRalph Boehme <slow@samba.org>
Sat, 29 Feb 2020 11:28:20 +0000 (12:28 +0100)
committerMartin Schwenke <martins@samba.org>
Thu, 12 Mar 2020 03:47:30 +0000 (03:47 +0000)
The node dead upcall has already restarted the outgoing connection.
There's no need to repeat it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14295

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Martin Schwenke <martin@meltin.net>
ctdb/tcp/tcp_connect.c

index ea98e6126a6241b58d7747ca3a813e349bd9a402..805fba5c27a22062182075b5064778eff0350d4a 100644 (file)
@@ -62,15 +62,9 @@ void ctdb_tcp_stop_connection(struct ctdb_node *node)
 void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private_data)
 {
        struct ctdb_node *node = talloc_get_type(private_data, struct ctdb_node);
-       struct ctdb_tcp_node *tnode = talloc_get_type(
-               node->transport_data, struct ctdb_tcp_node);
 
        node->ctdb->upcalls->node_dead(node);
 
-       ctdb_tcp_stop_connection(node);
-       tnode->connect_te = tevent_add_timer(node->ctdb->ev, tnode,
-                                            timeval_current_ofs(3, 0),
-                                            ctdb_tcp_node_connect, node);
        TALLOC_FREE(data);
 }