From c4db4c8d6d5c25e748571dc3a9c550c1eeff91d8 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 8 Jan 2012 14:12:17 -0500 Subject: [PATCH] Workaround or fix --- TODO | 1 + relay.ml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index a217091..781d940 100644 --- a/TODO +++ b/TODO @@ -2,3 +2,4 @@ Running the server and test3_latency, and then starting and interrupting test1_latency repeatedly, the server eventually corrupts itself and will no longer let test1_latency bind and receive messages. Sometimes test3_latency stops too. + [TENTATIVE FIX: see try/with in write_sexp in relay.ml] diff --git a/relay.ml b/relay.ml index 2a41feb..611af74 100644 --- a/relay.ml +++ b/relay.ml @@ -61,7 +61,7 @@ let relay_main peername cin cout = let mtx = Mutex.create () in let write_sexp s = Mutex.lock mtx; - output_sexp cout s; + (try output_sexp cout s with Sys_error _ -> ()); (* TODO: try removing this *) Mutex.unlock mtx in let flush_control = Event.new_channel () in