Skip to content

Commit

Permalink
fix rtt history
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAlphaFox committed Oct 1, 2021
1 parent 8555568 commit 0a0c5c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/aiutp_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,9 @@ handle_info({timeout,TRef,{check_interval,_}},
PCB1 = aiutp_pcb:check_timeouts(PCB),
{Buffers,PCB2} = aiutp_pcb:swap_socket(PCB1),
lists:foreach(fun(I) -> ok = gen_udp:send(Socket,Remote,I) end, Buffers),
io:format("RTT: ~p RTO: ~p MaxWindow: ~p CurWindowPackets: ~p ~n",
[PCB2#aiutp_pcb.rtt,PCB2#aiutp_pcb.rto,PCB2#aiutp_pcb.max_window,PCB2#aiutp_pcb.cur_window_packets]),
io:format("RTT: ~p RTTVar: ~p RTO: ~p MaxWindow: ~p CurWindowPackets: ~p ~n",
[PCB2#aiutp_pcb.rtt, PCB2#aiutp_pcb.rtt_var,PCB2#aiutp_pcb.rto,
PCB2#aiutp_pcb.max_window,PCB2#aiutp_pcb.cur_window_packets]),
%% 检查是否退出
case aiutp_pcb:closed(PCB2) of
{closed,Reason} ->
Expand Down

0 comments on commit 0a0c5c7

Please sign in to comment.