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 11"""Manage the communication sessions towards the USB-Stick."""
22from __future__ import annotations
33
4- from asyncio import PriorityQueue , Task , get_running_loop
4+ from asyncio import PriorityQueue , Task , get_running_loop , sleep
55from collections .abc import Callable
66from dataclasses import dataclass
77import logging
@@ -97,7 +97,7 @@ async def submit(
9797 if isinstance (request , NodePingRequest ):
9898 # For ping requests it is expected to receive timeouts, so lower log level
9999 _LOGGER .debug ("%s, cancel because timeout is expected for NodePingRequests" , e )
100- if request .resend :
100+ elif request .resend :
101101 _LOGGER .info ("%s, retrying" , e )
102102 else :
103103 _LOGGER .warning ("%s, cancel request" , e ) # type: ignore[unreachable]
@@ -142,5 +142,6 @@ async def _send_queue_worker(self) -> None:
142142 return
143143 await self ._stick .write_to_stick (request )
144144 self ._submit_queue .task_done ()
145+ await sleep (0.001 )
145146 _LOGGER .debug ("Sent from queue %s" , request )
146147 _LOGGER .debug ("Send_queue_worker stopped" )
You can’t perform that action at this time.
0 commit comments