File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -215,9 +215,10 @@ where
215215 let connection_f = async move {
216216 let mut connection_result = Err ( error:: internal ( "Initial connection failed" ) ) ;
217217 for i in 0 ..reconnect. 0 . reconnect_options . max_connection_attempts {
218+ let connection_count = i + 1 ;
218219 log:: debug!(
219220 "Connection attempt {}/{}" ,
220- i + 1 ,
221+ connection_count ,
221222 reconnect. 0 . reconnect_options. max_connection_attempts
222223 ) ;
223224 connection_result = match timeout (
@@ -230,7 +231,7 @@ where
230231 Err ( _) => Err ( error:: internal ( format ! (
231232 "Connection timed-out after {} seconds" ,
232233 reconnect. 0 . reconnect_options. connection_timeout. as_secs( )
233- * reconnect . 0 . reconnect_options . max_connection_attempts
234+ * connection_count
234235 ) ) ) ,
235236 } ;
236237 if connection_result. is_ok ( ) {
You can’t perform that action at this time.
0 commit comments