raiden-network / raiden-libs

Useful tools for Raiden and Auxiliary services
2 stars 12 forks source link

Uses retry_timeout and retry_delay instead of max_retries in Matrix #117

Closed andrevmatos closed 6 years ago

andrevmatos commented 6 years ago

Part of the fix for raiden-network/raiden#2058

andrevmatos commented 6 years ago

Just a comment: generators are iterables, not iterators. Iterables have an __iter__ method, which should return an iterator. Iterators have the next method to actually iterate over anything. This difference led to some bugs which were fortunatelly caught before merge by the tests, so I went with the retry_delay function case returning an iterable, which can then be for-looped, which should handle all cases as expected.

ulope commented 6 years ago

This is fine from my side now. Now you only need to find a solution you and Augusto can both agree to :)

hackaugusto commented 6 years ago

Now you only need to find a solution you and Augusto can both agree to :)

I'm fine with it. We don't agree on the solution but I don't think it's worth to discuss it further.