Open invidian opened 2 years ago
Actually, this does not affect agent, as it always drains the receive channel, but it's important to notice when consuming pkg/updateengine
directly, so we should have unit tests for this.
This also happens when you close the client before stopping the receiver routine, so clearly a bug.
Originally reported here: https://github.com/coreos/bugs/issues/1987
However, https://github.com/coreos/locksmith/pull/137/commits/8b0a62ef420c80cee39c3de77daeb7bf7c5bf81c doesn't seem like a correct fix for it, as you can avoid getting nil signal completely, if you wait for receiver loop to shut down, e.g. by waiting for the final nil value from given
ch
on the process spawningReceiveStatuses()
goroutine.Also related: https://github.com/godbus/dbus/issues/271