File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,10 @@ module Make(Time:Mirage_time.S) = struct
119119 t.on_close () ;
120120 Lwt. return_unit
121121
122+ let transition_to_timewait t =
123+ Lwt. async (fun () -> timewait t time_wait_time);
124+ Time_wait
125+
122126 let tick t (i :action ) =
123127 let diffone x y = Sequence. succ y = x in
124128 let tstr s (i :action ) =
@@ -148,15 +152,10 @@ module Make(Time:Mirage_time.S) = struct
148152 | Fin_wait_1 _ , Recv_rst -> t.on_close () ; Reset
149153 | Fin_wait_2 i , Recv_ack _ -> Fin_wait_2 (i + 1 )
150154 | Fin_wait_2 _ , Recv_rst -> t.on_close () ; Reset
151- | Fin_wait_2 _ , Recv_fin ->
152- Lwt. async (fun () -> timewait t time_wait_time);
153- Time_wait
155+ | Fin_wait_2 _ , Recv_fin -> transition_to_timewait t
154156 | Closing a , Recv_ack b ->
155157 if diffone b a then
156- begin
157- Lwt. async (fun () -> timewait t time_wait_time);
158- Time_wait
159- end
158+ transition_to_timewait t
160159 else Closing a
161160 | Closing _ , Timeout -> t.on_close () ; Closed
162161 | Closing _ , Recv_rst -> t.on_close () ; Reset
You can’t perform that action at this time.
0 commit comments