mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Raise RawConnError
This commit is contained in:
@ -29,7 +29,7 @@ class RawConnection(IRawConnection):
|
|||||||
# Detect if underlying transport is closing before write data to it
|
# Detect if underlying transport is closing before write data to it
|
||||||
# ref: https://github.com/ethereum/trinity/pull/614
|
# ref: https://github.com/ethereum/trinity/pull/614
|
||||||
if self.writer.transport.is_closing():
|
if self.writer.transport.is_closing():
|
||||||
raise ConnectionResetError("Transport is closing")
|
raise RawConnError("Transport is closing")
|
||||||
self.writer.write(data)
|
self.writer.write(data)
|
||||||
# Reference: https://github.com/ethereum/lahja/blob/93610b2eb46969ff1797e0748c7ac2595e130aef/lahja/asyncio/endpoint.py#L99-L102 # noqa: E501
|
# Reference: https://github.com/ethereum/lahja/blob/93610b2eb46969ff1797e0748c7ac2595e130aef/lahja/asyncio/endpoint.py#L99-L102 # noqa: E501
|
||||||
# Use a lock to serialize drain() calls. Circumvents this bug:
|
# Use a lock to serialize drain() calls. Circumvents this bug:
|
||||||
|
|||||||
Reference in New Issue
Block a user