fix(net): preserve ECIESError in connect_without_timeout (#19558)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
phrwlk
2025-11-06 23:26:07 +02:00
committed by GitHub
parent 7997cd4283
commit cb78b9da67

View File

@@ -67,8 +67,7 @@ where
secret_key: SecretKey,
remote_id: PeerId,
) -> Result<Self, ECIESError> {
let ecies = ECIESCodec::new_client(secret_key, remote_id)
.map_err(|_| io::Error::other("invalid handshake"))?;
let ecies = ECIESCodec::new_client(secret_key, remote_id)?;
let mut transport = ecies.framed(transport);