Convert presence handler helpers to async/await. (#7939)

This commit is contained in:
Patrick Cloke 2020-07-23 16:47:36 -04:00 committed by GitHub
parent 83434df381
commit fefe9943ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 24 deletions

View file

@ -453,7 +453,9 @@ class FederationSender(object):
"""Given a list of states populate self.pending_presence_by_dest and
poke to send a new transaction to each destination
"""
hosts_and_states = yield get_interested_remotes(self.store, states, self.state)
hosts_and_states = yield defer.ensureDeferred(
get_interested_remotes(self.store, states, self.state)
)
for destinations, states in hosts_and_states:
for destination in destinations: