calc_retry_wait is broken if Integer is used for retry_wait