Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

don't remove resource unless we actually added it

  • Loading branch information...
commit 8dbab94cee186f998a17378bc84632b0f639ae1d 1 parent 759b1f0
authored December 02, 2010

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  src/lwt-equeue/lwt_equeue.ml
7  src/lwt-equeue/lwt_equeue.ml
@@ -43,11 +43,12 @@ let select add set_r set_w set_e timeout =
43 43
     | Some t -> es#remove_resource g t
44 44
   end;
45 45
   begin match timeout with
46  
-    | None -> old_timeout := None
47  
-    | Some ts ->
  46
+    | Some ts when add ->
48 47
         let r = Unixqueue.Wait (es#new_wait_id ()) in
49  
-        if add then es#add_resource g (r, ts);
  48
+        es#add_resource g (r, ts);
50 49
         old_timeout := Some r
  50
+    | _ ->
  51
+        old_timeout := None
51 52
   end;
52 53
   (lazy 0., [], [], [])
53 54
 

0 notes on commit 8dbab94

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