File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,19 @@ def send_request(self, request):
74
74
75
75
async def asend_request (self , request ):
76
76
retries_left = self .MAX_RETRIES
77
+ if self .PAUSE_BEFORE_SEND :
78
+ await asyncio .sleep (self .PAUSE_BEFORE_SEND )
77
79
while True :
78
80
try :
79
- if self .PAUSE_BEFORE_SEND :
80
- await asyncio .sleep (self .PAUSE_BEFORE_SEND )
81
81
self .network .send_message (self .rx_cobid , request )
82
82
except CanError as e :
83
83
# Could be a buffer overflow. Wait some time before trying again
84
84
retries_left -= 1
85
85
if not retries_left :
86
86
raise
87
87
logger .info (str (e ))
88
- if self .PAUSE_AFTER_SEND :
89
- await asyncio .sleep (self .PAUSE_AFTER_SEND )
88
+ if self .RETRY_DELAY :
89
+ await asyncio .sleep (self .RETRY_DELAY )
90
90
else :
91
91
break
92
92
You can’t perform that action at this time.
0 commit comments