Closed anoadragon453 closed 1 year ago
Yes, we should write a test to ensure that homeserver callbacks on bind get retried. This was a drive-by fix though, and I'm not likely to get around to that in a while.
So I've left an issue instead: https://github.com/matrix-org/sydent/issues/554
When an error occurred while informing a homeserver of a successful bind between a Matrix ID and a third-party ID, Sydent should log the error and retry the request to the homeserver.
Right now this is broken, and Sydent will raise a
RuntimeWarning
due toThreepidBinder._notify
not being await'd:This would call the request to never be retried as well, breaking reliability.
This PR fixes the call to
ThreepidBinder._notify
so that it is properly awaited viadefer.ensureDeferred
. Theself.sydent.reactor.callLater(...)
call is used for backing off purposes, and expects a Callable, not a Coroutine, hence the use of something likedefer.ensureDeferred
.