Skip to content
Browse files

Temporary debug change: set time_wait and fin_wait2 timers to max 4 sec

  • Loading branch information...
1 parent c174d20 commit d45b8c8779a42659206c44926ff8106bebb70a86 @balrajsingh balrajsingh committed May 3, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/net/direct/tcp/state.ml
View
7 lib/net/direct/tcp/state.ml
@@ -17,6 +17,9 @@
open Lwt
open Printf
+let fin_wait_2_time = (* 60. *) 4.
+let time_wait_time = (* 30. *) 2.
+
type action =
| Passive_open
| Recv_rst
@@ -128,15 +131,15 @@ let tick t (i:action) =
| Fin_wait_1 a, Recv_ack b ->
if diffone b a then
let count = 0 in
- let _ = finwait2timer t count 60. in
+ let _ = finwait2timer t count fin_wait_2_time in
Fin_wait_2 count
else
Fin_wait_1 a
| Fin_wait_1 a, Recv_fin -> Closing a
| Fin_wait_1 a, Recv_finack b -> if diffone b a then Time_wait else Fin_wait_1 a
| Fin_wait_1 a, Timeout -> t.on_close (); Closed
| Fin_wait_2 i, Recv_ack _ -> Fin_wait_2 (i + 1)
- | Fin_wait_2 i, Recv_fin -> let _ = timewait t 30. in Time_wait
+ | Fin_wait_2 i, Recv_fin -> let _ = timewait t time_wait_time in Time_wait
| Closing a, Recv_ack b -> if diffone b a then Time_wait else Closing a
| Time_wait, Timeout -> t.on_close (); Closed
| Close_wait, Send_fin a -> Last_ack a

0 comments on commit d45b8c8

Please sign in to comment.
Something went wrong with that request. Please try again.