@@ -150,7 +150,9 @@ async def _async_create_endpoints(self) -> None:
150
150
sender_sockets .append (s )
151
151
152
152
for s in reader_sockets :
153
- transport , protocol = await loop .create_datagram_endpoint (lambda : AsyncListener (self .zc ), sock = s )
153
+ transport , protocol = await loop .create_datagram_endpoint (
154
+ lambda : AsyncListener (self .zc ), sock = s # type: ignore[arg-type, return-value]
155
+ )
154
156
self .protocols .append (cast (AsyncListener , protocol ))
155
157
self .readers .append (_make_wrapped_transport (cast (asyncio .DatagramTransport , transport )))
156
158
if s in sender_sockets :
@@ -198,7 +200,7 @@ def close(self) -> None:
198
200
run_coro_with_timeout (self ._async_close (), self .loop , _CLOSE_TIMEOUT )
199
201
200
202
201
- class AsyncListener ( asyncio . Protocol , QuietLogger ) :
203
+ class AsyncListener :
202
204
203
205
"""A Listener is used by this module to listen on the multicast
204
206
group to which DNS messages are sent, allowing the implementation
@@ -207,7 +209,16 @@ class AsyncListener(asyncio.Protocol, QuietLogger):
207
209
It requires registration with an Engine object in order to have
208
210
the read() method called when a socket is available for reading."""
209
211
210
- __slots__ = ('zc' , 'data' , 'last_time' , 'transport' , 'sock_description' , '_deferred' , '_timers' )
212
+ __slots__ = (
213
+ 'zc' ,
214
+ 'data' ,
215
+ 'last_time' ,
216
+ 'last_message' ,
217
+ 'transport' ,
218
+ 'sock_description' ,
219
+ '_deferred' ,
220
+ '_timers' ,
221
+ )
211
222
212
223
def __init__ (self , zc : 'Zeroconf' ) -> None :
213
224
self .zc = zc
@@ -357,7 +368,7 @@ def error_received(self, exc: Exception) -> None:
357
368
# different socket in case there are problems with multiple
358
369
# sockets
359
370
msg_str = f"Error with socket { self .sock_description } ): %s"
360
- self .log_exception_once (exc , msg_str , exc )
371
+ QuietLogger .log_exception_once (exc , msg_str , exc )
361
372
362
373
def connection_made (self , transport : asyncio .BaseTransport ) -> None :
363
374
wrapped_transport = _make_wrapped_transport (cast (asyncio .DatagramTransport , transport ))
0 commit comments