File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,30 @@ def connection_lost(self, exc):
226
226
227
227
self .assertIn (tmp_file2 , pr .addrs )
228
228
229
+ def test_create_datagram_1 (self ):
230
+ server_addr = ('127.0.0.1' , 8888 )
231
+ client_addr = ('127.0.0.1' , 0 )
232
+
233
+ async def run ():
234
+ server_transport , client_protocol = \
235
+ await self .loop .create_datagram_endpoint (
236
+ asyncio .DatagramProtocol ,
237
+ local_addr = server_addr )
238
+
239
+ client_transport , client_conn = \
240
+ await self .loop .create_datagram_endpoint (
241
+ asyncio .DatagramProtocol ,
242
+ remote_addr = server_addr ,
243
+ local_addr = client_addr )
244
+
245
+ client_transport .close ()
246
+ server_transport .close ()
247
+
248
+ # let transports close
249
+ await asyncio .sleep (0.1 )
250
+
251
+ self .loop .run_until_complete (run ())
252
+
229
253
230
254
class Test_UV_UDP (_TestUDP , tb .UVTestCase ):
231
255
Original file line number Diff line number Diff line change @@ -3040,8 +3040,6 @@ cdef class Loop:
3040
3040
' could not bind to remote_addr {}' .format(
3041
3041
remote_addr))
3042
3042
3043
- udp._connect(rai.ai_addr, rai.ai_addrlen)
3044
-
3045
3043
if allow_broadcast:
3046
3044
udp._set_broadcast(1 )
3047
3045
You can’t perform that action at this time.
0 commit comments