connectd: remove unused timers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-09-28 06:29:19 +09:30
parent c9001f653a
commit 6dbf1ef2c4
1 changed files with 3 additions and 20 deletions

View File

@ -13,7 +13,6 @@
#include <ccan/noerr/noerr.h> #include <ccan/noerr/noerr.h>
#include <ccan/take/take.h> #include <ccan/take/take.h>
#include <ccan/tal/str/str.h> #include <ccan/tal/str/str.h>
#include <ccan/timer/timer.h>
#include <common/bech32.h> #include <common/bech32.h>
#include <common/bech32_util.h> #include <common/bech32_util.h>
#include <common/cryptomsg.h> #include <common/cryptomsg.h>
@ -24,7 +23,6 @@
#include <common/pseudorand.h> #include <common/pseudorand.h>
#include <common/status.h> #include <common/status.h>
#include <common/subdaemon.h> #include <common/subdaemon.h>
#include <common/timeout.h>
#include <common/type_to_string.h> #include <common/type_to_string.h>
#include <common/utils.h> #include <common/utils.h>
#include <common/version.h> #include <common/version.h>
@ -98,8 +96,6 @@ struct daemon {
/* Connection to main daemon. */ /* Connection to main daemon. */
struct daemon_conn master; struct daemon_conn master;
struct timers timers;
/* Local and global features to offer to peers. */ /* Local and global features to offer to peers. */
u8 *localfeatures, *globalfeatures; u8 *localfeatures, *globalfeatures;
@ -1304,7 +1300,6 @@ int main(int argc, char *argv[])
pubkey_set_init(&daemon->peers); pubkey_set_init(&daemon->peers);
list_head_init(&daemon->reconnecting); list_head_init(&daemon->reconnecting);
list_head_init(&daemon->reaching); list_head_init(&daemon->reaching);
timers_init(&daemon->timers, time_mono());
daemon->broken_resolver_response = NULL; daemon->broken_resolver_response = NULL;
daemon->listen_fds = tal_arr(daemon, struct listen_fd, 0); daemon->listen_fds = tal_arr(daemon, struct listen_fd, 0);
/* stdin == control */ /* stdin == control */
@ -1312,19 +1307,7 @@ int main(int argc, char *argv[])
master_gone); master_gone);
status_setup_async(&daemon->master); status_setup_async(&daemon->master);
/* When conn closes, everything is freed. */ /* Should never exit. */
tal_steal(daemon->master.conn, daemon); io_loop(NULL, NULL);
abort();
for (;;) {
struct timer *expired = NULL;
io_loop(&daemon->timers, &expired);
if (!expired) {
break;
} else {
timer_expired(daemon, expired);
}
}
daemon_shutdown();
return 0;
} }