Skip to content

Commit

Permalink
Don't block in UPDATES.get forever
Browse files Browse the repository at this point in the history
Otherwise restarting xapi will leak a thread in xenopsd.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
  • Loading branch information
David Scott committed Jun 8, 2013
1 parent 2c2b3e2 commit 66b0fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocaml/xapi/xapi_xenops.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ let rec events_watch ~__context queue_name from =
let dbg = Context.string_of_task __context in
if Xapi_fist.delay_xenopsd_event_threads () then Thread.delay 30.0;
let module Client = (val make_client queue_name : XENOPS) in
let barriers, events, next = Client.UPDATES.get dbg from None in
let barriers, events, next = Client.UPDATES.get dbg from (Some 30) in
let done_events = ref [] in
let already_done x = List.mem x !done_events in
let add_event x = done_events := (x :: !done_events) in
Expand Down

0 comments on commit 66b0fa5

Please sign in to comment.