mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
asyncio: Replace connection_refused() with error_received().
This commit is contained in:
parent
6f87a08aa7
commit
2335de7a20
5 changed files with 39 additions and 29 deletions
|
|
@ -78,7 +78,7 @@ class MyDatagramProto(protocols.DatagramProtocol):
|
|||
assert self.state == 'INITIALIZED', self.state
|
||||
self.nbytes += len(data)
|
||||
|
||||
def connection_refused(self, exc):
|
||||
def error_received(self, exc):
|
||||
assert self.state == 'INITIALIZED', self.state
|
||||
|
||||
def connection_lost(self, exc):
|
||||
|
|
@ -1557,7 +1557,7 @@ class ProtocolsAbsTests(unittest.TestCase):
|
|||
dp = protocols.DatagramProtocol()
|
||||
self.assertIsNone(dp.connection_made(f))
|
||||
self.assertIsNone(dp.connection_lost(f))
|
||||
self.assertIsNone(dp.connection_refused(f))
|
||||
self.assertIsNone(dp.error_received(f))
|
||||
self.assertIsNone(dp.datagram_received(f, f))
|
||||
|
||||
sp = protocols.SubprocessProtocol()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue