diff --git a/src/main.c b/src/main.c index 580bbda..a5ee197 100644 --- a/src/main.c +++ b/src/main.c @@ -1151,6 +1151,9 @@ int main (int argc, char **argv) if (!ai) return 1; + if (state_init(statefile)) + return 1; + struct fdbuf tun = { .fd = -1 }; struct fdbuf sock = { .fd = -1 }; @@ -1183,9 +1186,6 @@ int main (int argc, char **argv) if (gt_setup_secretkey(&ctx, keyfile)) return 1; - if (state_init(statefile)) - return 1; - long retry = 0; uint8_t *db = NULL;