mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
Fix a segfault on startup :(
This commit is contained in:
parent
8eec695a92
commit
7371ba09fc
6
v/raft.c
6
v/raft.c
@ -1336,8 +1336,6 @@ _raft_foll_init(u2_raft* raf_u)
|
||||
|
||||
// Start the initial election timeout.
|
||||
{
|
||||
uv_timer_init(u2L, &raf_u->tim_u);
|
||||
raf_u->tim_u.data = raf_u;
|
||||
uv_timer_start(&raf_u->tim_u, _raft_time_cb, _raft_election_rand(), 0);
|
||||
}
|
||||
}
|
||||
@ -1359,6 +1357,10 @@ u2_raft_init()
|
||||
{
|
||||
u2_raft* raf_u = u2R;
|
||||
|
||||
// Initialize timer -- used in both single and multi-instance mode, for different things.
|
||||
uv_timer_init(u2L, &raf_u->tim_u);
|
||||
raf_u->tim_u.data = raf_u;
|
||||
|
||||
if ( 0 == u2_Host.ops_u.raf_c ) {
|
||||
_raft_lone_init(raf_u);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user