Skip to content

Commit 9c0b20e

Browse files
committed
fixup! CA-419908: Update xenstore watcher to refresh domains when VM is renamed
1 parent 343ff8c commit 9c0b20e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ocaml/libs/ezxenstore/watch/ez_xenstore_watch.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,17 @@ module Make (Debug : DEBUG) = struct
200200
in
201201

202202
let process_one_watch c (path, _token) =
203-
if path = _introduceDomain || path = _releaseDomain then (
203+
if
204+
Atomic.exchange need_refresh_domains false
205+
|| path = _introduceDomain
206+
|| path = _releaseDomain
207+
then
204208
look_for_different_domains () ;
205-
Atomic.set need_refresh_domains false
206-
) else (
207-
if Atomic.exchange need_refresh_domains false then
208-
look_for_different_domains () ;
209+
if path <> _introduceDomain && path <> _releaseDomain then
209210
Client.immediate c (fun h ->
210211
let xs = Xs.ops h in
211212
Actions.watch_fired xc xs path !domains !watches
212213
)
213-
)
214214
in
215215

216216
let register_for_watches () =

0 commit comments

Comments
 (0)