Skip to content

Commit

Permalink
Merge pull request #886 from openziti/assign-global-loop-immediately
Browse files Browse the repository at this point in the history
Assign global loop immediately
  • Loading branch information
dovholuknf authored Jul 2, 2024
2 parents ffe7622 + fe276f7 commit 73136da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions programs/ziti-edge-tunnel/ziti-edge-tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -3290,6 +3290,12 @@ int main(int argc, char *argv[]) {
name = name + 1;
}

global_loop_ref = uv_default_loop();
if (global_loop_ref == NULL) {
printf("failed to initialize default uv loop"); //can't use ZITI_LOG here
exit(EXIT_FAILURE);
}

main_cmd.name = name;
#if _WIN32
SvcStart();
Expand All @@ -3305,12 +3311,6 @@ int main(int argc, char *argv[]) {
}
#endif

global_loop_ref = uv_default_loop();
if (global_loop_ref == NULL) {
ZITI_LOG(ERROR, "failed to initialize default uv loop");
exit(EXIT_FAILURE);
}

commandline_run(&main_cmd, argc, argv);
return 0;
}
Expand Down

0 comments on commit 73136da

Please sign in to comment.