From 3b0386d86176f3ba615c9afad1001a67d37473ea Mon Sep 17 00:00:00 2001 From: NIC619 Date: Tue, 24 Dec 2019 22:27:16 +0800 Subject: [PATCH] Raise `RawConnError` --- libp2p/network/connection/raw_connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/network/connection/raw_connection.py b/libp2p/network/connection/raw_connection.py index dddbd99..f8ee6bb 100644 --- a/libp2p/network/connection/raw_connection.py +++ b/libp2p/network/connection/raw_connection.py @@ -29,7 +29,7 @@ class RawConnection(IRawConnection): # Detect if underlying transport is closing before write data to it # ref: https://github.com/ethereum/trinity/pull/614 if self.writer.transport.is_closing(): - raise ConnectionResetError("Transport is closing") + raise RawConnError("Transport is closing") self.writer.write(data) # 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: