| 441 | } |
| 442 | |
| 443 | void TimerCB(int, int16_t) { |
| 444 | timer_.reset(); |
| 445 | // Wake up the connection upon timeout. |
| 446 | // WakeupWaitConnection will hold the lock of the connection during the execution, |
| 447 | // holding the lock is necessary to avoid race condition that timeout and replication ack happen at the same time. |
| 448 | srv_->WakeupWaitConnection(conn_, target_seq_); |
| 449 | } |
| 450 | |
| 451 | void OnEvent(bufferevent *bev, int16_t events) { |
| 452 | if (events & (BEV_EVENT_EOF | BEV_EVENT_ERROR)) { |
nothing calls this directly
no test coverage detected