File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -581,6 +581,9 @@ def do_register():
581
581
return (res ['queue_id' ], res ['last_event_id' ])
582
582
583
583
queue_id = None
584
+ # Make long-polling requests with `get_events`. Once a request
585
+ # has received an answer, pass it to the callback and before
586
+ # making a new long-polling request.
584
587
while True :
585
588
if queue_id is None :
586
589
(queue_id , last_event_id ) = do_register ()
@@ -607,7 +610,9 @@ def do_register():
607
610
#
608
611
# Reset queue_id to register a new event queue.
609
612
queue_id = None
610
- # TODO: Make this back off once it's more reliable
613
+ # Add a pause here to cover against potential bugs in this library
614
+ # causing a DoS attack against a server when getting errors.
615
+ # TODO: Make this back off exponentially.
611
616
time .sleep (1 )
612
617
continue
613
618
You can’t perform that action at this time.
0 commit comments