Le Tuesday 20 November 2007 03:26:23 Jeff Simmons, vous avez écrit :
> [EMAIL PROTECTED]/L5C11:3] switch to [EMAIL PROTECTED]/L5C42 with forgetful
> transition
>
> and never reconnects.
>
> I need it to reconnect, by itself, without outside input, and to keep
> trying until the server comes back up. Any way I can do that?

Ok, that's a known issue as David said.

Last time we checked this issue, it seemed to be caused by the fact that the 
http connection socket does not set any timeout, so the http source does not 
reconnect..

Attached is a (trivial) patch that forces a timeout of 20 seconds in reading 
and writing.

We'll be interested in knowing wether this fixes your issue.
You can change the timeout value to closer value if you wish..


Romain

Index: tools/http.ml
===================================================================
--- tools/http.ml	(révision 4805)
+++ tools/http.ml	(copie de travail)
@@ -107,6 +107,9 @@
 
 let connect host port =
   let socket = Unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
+  (* Add some timeout *)
+  Unix.setsockopt_float socket Unix.SO_RCVTIMEO 20. ;
+  Unix.setsockopt_float socket Unix.SO_SNDTIMEO 20. ;
     try
       Unix.connect
         socket

Reply via email to