ctdb-tcp: always call node_dead() upcall in ctdb_tcp_tnode_cb()
authorRalph Boehme <slow@samba.org>
Sat, 29 Feb 2020 11:13:12 +0000 (12:13 +0100)
committerMartin Schwenke <martins@samba.org>
Thu, 12 Mar 2020 03:47:30 +0000 (03:47 +0000)
commitb83ef98c7466b2a81968555de83fb977bb6ca9f0
tree31b3ca37080233cd8abd6ef4cbf203df6e791b34
parent0ff1b78fc2f0491f9e11131d0040bdaba8873770
ctdb-tcp: always call node_dead() upcall in ctdb_tcp_tnode_cb()

ctdb_tcp_tnode_cb() is called when we receive data on the outgoing connection.

This can happen when we get an EOF on the connection because the other side as
closed. In this case data will be NULL.

It would also be called if we received data from the peer. In this case data
will not be NULL.

The latter case is a fatal error though and we already call
ctdb_tcp_stop_connection() for this case as well, which means even though the
node is not fully connected anymore, by not calling the node_dead() upcall
NODE_FLAGS_DISCONNECTED will not be set.

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

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