ctdb-tcp: Create outbound queue when the connection becomes writable
authorMartin Schwenke <martin@meltin.net>
Thu, 15 Aug 2019 05:57:31 +0000 (15:57 +1000)
committerMartin Schwenke <martins@samba.org>
Fri, 16 Aug 2019 21:30:35 +0000 (21:30 +0000)
commit7f4854d9643a096a6d8a354fcd27b7c6ed24a75e
tree47ae406f68dffefaa08127b172328bb6fa098f21
parentd80d9edb4dc107b15a35a39e5c966a3eaed6453a
ctdb-tcp: Create outbound queue when the connection becomes writable

Since commit ddd97553f0a8bfaada178ec4a7460d76fa21f079
ctdb_queue_send() doesn't queue a packet if the connection isn't yet
established (i.e. when fd == -1).  So, don't bother creating the
outbound queue during initialisation but create it when the connection
becomes writable.

Now the presence of the queue indicates that the outbound connection
is up.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tcp/tcp_connect.c
ctdb/tcp/tcp_init.c
ctdb/tcp/tcp_io.c