Skip to content

Commit 71eea16

Browse files
authored
Update for loop to infinity in http_client.py
The elif-statement in its original form would never be executed, so the exception would never be raised. This could potentially lead to an infinite loop.
1 parent 33dc65c commit 71eea16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

steembase/http_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def exec(self, name, *args, api=None, return_with_args=None, _ret_cnt=0):
157157
# try switching nodes before giving up
158158
if _ret_cnt > 2:
159159
time.sleep(_ret_cnt) # we should wait only a short period before trying the next node, but still slowly increase backoff
160-
elif _ret_cnt > 10:
160+
if _ret_cnt > 10:
161161
raise e
162162
self.next_node()
163163
logging.debug('Switched node to %s due to exception: %s' %

0 commit comments

Comments
 (0)