diff options
author | Martin Schwenke <martin@meltin.net> | 2019-10-29 17:28:22 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-11-06 01:22:30 +0000 |
commit | bf47bc18bb8a94231870ef821c0352b7a15c2e28 (patch) | |
tree | c3290a598682394c4567cd471e4719d7a9e13eb0 | |
parent | d0baad257e511280ff3e5c7372c38c43df841070 (diff) | |
download | samba-bf47bc18bb8a94231870ef821c0352b7a15c2e28.tar.gz |
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>
-rw-r--r-- | ctdb/tcp/ctdb_tcp.h | 1 | ||||
-rw-r--r-- | ctdb/tcp/tcp_connect.c | 2 | ||||
-rw-r--r-- | ctdb/tcp/tcp_init.c | 6 | ||||
-rw-r--r-- | ctdb/tcp/tcp_io.c | 2 |
4 files changed, 0 insertions, 11 deletions
diff --git a/ctdb/tcp/ctdb_tcp.h b/ctdb/tcp/ctdb_tcp.h index 9a615fc6393..daabad74297 100644 --- a/ctdb/tcp/ctdb_tcp.h +++ b/ctdb/tcp/ctdb_tcp.h @@ -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; }; diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index df115b783e0..a75f35a809e 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -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 diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index a9cb9b36a01..3be16bd7d5e 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -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; diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c index e8ebff887e1..2d8ec0f7062 100644 --- a/ctdb/tcp/tcp_io.c +++ b/ctdb/tcp/tcp_io.c @@ -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); |