File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,8 @@ def __init__(
232232 super ().__init__ (* args , ** kwargs )
233233 if packet_callback :
234234 self .packet_callback = packet_callback
235- self ._command_ack = asyncio .Event (loop = self . loop )
236- self ._ready_to_send = asyncio .Lock (loop = self . loop )
235+ self ._command_ack = asyncio .Event ()
236+ self ._ready_to_send = asyncio .Lock ()
237237
238238 def handle_response_packet (self , packet : PacketType ) -> None :
239239 """Handle response packet."""
@@ -254,9 +254,7 @@ def send_command_ack(
254254
255255 log .debug ("waiting for acknowledgement" )
256256 try :
257- yield from asyncio .wait_for (
258- self ._command_ack .wait (), TIMEOUT .seconds , loop = self .loop
259- )
257+ yield from asyncio .wait_for (self ._command_ack .wait (), TIMEOUT .seconds )
260258 log .debug ("packet acknowledged" )
261259 except concurrent .futures ._base .TimeoutError :
262260 acknowledgement = False
You can’t perform that action at this time.
0 commit comments