Skip to content

Commit

Permalink
flush
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAlphaFox committed Oct 4, 2021
1 parent 50bdd0b commit e466eb2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/aiutp_pcb.erl
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ check_timeouts_1(#aiutp_pcb{time=Now,
max_window = MaxWindow,
outbuf = OutBuf,
seq_nr = SeqNR,
brust = Brust,
retransmit_count = RetransmitCount} = PCB) ->

NewTimeout = RetransmitTimeout * 2,
Expand All @@ -556,7 +557,11 @@ check_timeouts_1(#aiutp_pcb{time=Now,
fast_timeout = true,
timeout_seq_nr = SeqNR
},
{true,aiutp_net:send_packet(aiutp_buffer:head(OutBuf0), PCB1)};
PCB2 =
if Brust == true -> aiutp_net:flush_packets(PCB);
true -> aiutp_net:send_packet(aiutp_buffer:head(OutBuf0), PCB1)
end,
{true,PCB2};
true -> {true,PCB0}
end.
write(_,#aiutp_pcb{state = State} = PCB)
Expand Down

0 comments on commit e466eb2

Please sign in to comment.