Skip to content

Commit fea2aae

Browse files
committed
Merge branch 'dev' of github.com:AndreasAakesson/IncludeOS into dev
2 parents c3741ba + aa2068e commit fea2aae

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/net/tcp/connection.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,14 @@ void Connection::take_rtt_measure(const Packet& packet)
629629
if(cb.SND.TS_OK)
630630
{
631631
auto* ts = parse_ts_option(packet);
632-
rttm.rtt_measurement(RTTM::milliseconds{host_.get_ts_value() - ntohl(ts->ecr)});
632+
if(ts)
633+
{
634+
rttm.rtt_measurement(RTTM::milliseconds{host_.get_ts_value() - ntohl(ts->ecr)});
635+
return;
636+
}
633637
}
634-
else if(rttm.active())
638+
639+
if(rttm.active())
635640
{
636641
rttm.stop(RTTM::milliseconds{host_.get_ts_value()});
637642
}

0 commit comments

Comments
 (0)