1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

ctdb-tcp: Drop tracking of file descriptor for incoming connections

This file descriptor is owned by the incoming queue.  It will be
closed when the queue is torn down.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14175
RN: Avoid communication breakdown on node reconnect

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2019-10-29 17:28:22 +11:00 committed by Amitay Isaacs
parent d0baad257e
commit bf47bc18bb
4 changed files with 0 additions and 11 deletions

View File

@ -37,7 +37,6 @@ struct ctdb_tcp_node {
struct tevent_timer *connect_te;
struct ctdb_context *ctdb;
int in_fd;
struct ctdb_queue *in_queue;
};

View File

@ -355,8 +355,6 @@ static void ctdb_listen_event(struct tevent_context *ev, struct tevent_fd *fde,
return;
}
tnode->in_fd = fd;
/*
* Mark the connecting node as connected, but only if the
* corresponding outbound connected is also up

View File

@ -43,11 +43,6 @@ static int tnode_destructor(struct ctdb_tcp_node *tnode)
tnode->out_fd = -1;
}
if (tnode->in_fd != -1) {
close(tnode->in_fd);
tnode->in_fd = -1;
}
return 0;
}
@ -61,7 +56,6 @@ static int ctdb_tcp_add_node(struct ctdb_node *node)
CTDB_NO_MEMORY(node->ctdb, tnode);
tnode->out_fd = -1;
tnode->in_fd = -1;
tnode->ctdb = node->ctdb;
node->private_data = tnode;

View File

@ -76,8 +76,6 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
failed:
TALLOC_FREE(tnode->in_queue);
close(tnode->in_fd);
tnode->in_fd = -1;
node->ctdb->upcalls->node_dead(node);
TALLOC_FREE(data);