create libimage-events channel in main routine
Move the creation of the channel outside of the sub-routine to fix a
data race between writing the channel (implicitly by calling
EventChannel()) and using that channel in libimage.
[NO TESTS NEEDED]
Fixes:
@@ -715,9 +715,8 @@ func (r *Runtime) libimageEvents() {
return status
}
- go func() {
eventChannel := r.libimageRuntime.EventChannel()
-
+ go func() {
for {
// Make sure to read and write all events before
// checking if we're about to shutdown.
