Pass missing argument to the method.
@@ -125,7 +125,7 @@ class ConnectionRetryWrapper(object):
wrapped_callback(connection=connection, channel=channel)
should_stop = True
except connection.connection_errors + connection.channel_errors as e:
- should_stop, wait = self._retry_context.test_should_stop()
+ should_stop, wait = self._retry_context.test_should_stop(e)
# reset channel to None to avoid any channel closing errors. At this point
# in case of an exception there should be no channel but that is better to
# guarantee.
