change idle timeout and retry to time.Duration type