Fixes retry attempts logic error

Signed-off-by: Oren Leiman <oleiman@neutral.io>