Revision f12fdfae src/raft/RaftManager.cc

View differences:

src/raft/RaftManager.cc
370 370

  
371 371
    requests.clear();
372 372

  
373
    leader_hook->do_hook(0);
373
    if ( leader_hook != 0 )
374
    {
375
        leader_hook->do_hook(0);
376
    }
374 377

  
375 378
    state = LEADER;
376 379

  
......
431 434

  
432 435
    pthread_mutex_lock(&mutex);
433 436

  
434
    if ( state == LEADER )
437
    if ( state == LEADER && follower_hook != 0 )
435 438
    {
436 439
        follower_hook->do_hook(0);
437 440
    }

Also available in: Unified diff