fixed a fd close error on reconnect
authorAndrew Tridgell <tridge@samba.org>
Tue, 15 May 2007 00:33:28 +0000 (10:33 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 15 May 2007 00:33:28 +0000 (10:33 +1000)
tcp/tcp_connect.c

index ac82e4f5757169086c8a8748dacc47981b5b5574..b3c5184527397702009f91124511a3316ba5992e 100644 (file)
@@ -167,16 +167,6 @@ void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
                     ctdb_node_connect_write, node);
 }
 
-/*
-  destroy a ctdb_incoming structure 
-*/
-static int ctdb_incoming_destructor(struct ctdb_incoming *in)
-{
-       close(in->fd);
-       in->fd = -1;
-       return 0;
-}
-
 /*
   called when we get contacted by another node
   currently makes no attempt to check if the connection is really from a ctdb
@@ -207,8 +197,6 @@ static void ctdb_listen_event(struct event_context *ev, struct fd_event *fde,
 
        in->queue = ctdb_queue_setup(ctdb, in, in->fd, CTDB_TCP_ALIGNMENT, 
                                     ctdb_tcp_read_cb, in);
-
-       talloc_set_destructor(in, ctdb_incoming_destructor);
 }