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