Fix requires so that broken,departed removes available

The {relation-name}.available state persisted even though the
conversation had departed.  This led code to think the connection was
still valid, try to use it, and then crash.

Change-Id: I523fecff4e80734772872a8a6d2507f1e2162ae3
This commit is contained in:
Alex Kavanagh 2017-05-31 11:52:29 +01:00
parent eb3b2968e8
commit d794839e71
1 changed files with 1 additions and 2 deletions

View File

@ -41,8 +41,7 @@ class BindRNDCRequires(RelationBase):
def departed_or_broken(self):
conv = self.conversation()
conv.remove_state('{relation_name}.connected')
if not self.data_complete():
conv.remove_state('{relation_name}.available')
conv.remove_state('{relation_name}.available')
def data_complete(self):
"""Check if all information for a RNDC connection has been sent