The remote relation worker handles the offer side relation dying #41

Merged
merged 1 commit into from Jul 31, 2017

Conversation

Projects
None yet
2 participants
Owner

wallyworld commented Jul 28, 2017

Description of change

The remote relation worker on the consumer side now reacts to the offer side relation dying by making the local relation die as well.

QA steps

Deploy a mediawiki-mysql cmr scenario.
Remove the relation on the mysql (offer) side.
The relation on the mediawiki side should die also.

axw approved these changes Jul 31, 2017

+ return w.catacomb.ErrDying()
+ case relChanges, ok := <-w.relationsWatcher.Changes():
+ if !ok {
+ // We are dying.
@axw

axw Jul 31, 2017

Collaborator

can you please make this return w.catacomb.ErrDying()? then if there's a bug with the channel being closed, this loop won't spin forever

@wallyworld wallyworld merged commit 1548208 into relation-status-watcher-api Jul 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment