Commit 327a7adb authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Avoid setting 0 to repeat field

parent 9e089521
......@@ -552,8 +552,8 @@ int Client::quic_pkt_timeout() {
void Client::quic_restart_pkt_timer() {
auto expiry = ngtcp2_conn_get_expiry(quic.conn);
auto now = timestamp(worker->loop);
auto t = expiry < now ? 1e-9
: static_cast<ev_tstamp>(expiry - now) / NGTCP2_SECONDS;
auto t = expiry > now ? static_cast<ev_tstamp>(expiry - now) / NGTCP2_SECONDS
: 1e-9;
quic.pkt_timer.repeat = t;
ev_timer_again(worker->loop, &quic.pkt_timer);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment