Actually do something (die) when time allotted to catch X response elapses
authormalc <av1474@comtv.ru>
Mon, 29 Oct 2012 11:42:01 +0000 (29 15:42 +0400)
committermalc <av1474@comtv.ru>
Mon, 29 Oct 2012 11:42:01 +0000 (29 15:42 +0400)
wsi.ml

diff --git a/wsi.ml b/wsi.ml
index e947770..bba6a47 100644 (file)
--- a/wsi.ml
+++ b/wsi.ml
@@ -499,7 +499,7 @@ let syncsendwithrep sock secstowait s f =
   let rec readtillcompletion () =
     let r, _, _ = Unix.select [sock] [] [] (deadline -. now ()) in
     match r with
-    | [] -> readtillcompletion ()
+    | [] -> error "didn't get X response in %f seconds, aborting" secstowait
     | _ ->
         readresp sock;
         if not !completed