Prevent errors for stream termination race (#1853)

Prevents an error being propagated on a race condition for RPC stream termination
This commit is contained in:
Age Manning 2020-11-03 10:37:00 +00:00
parent 0cde4e285c
commit 0a0f4daf9d

View File

@ -912,6 +912,8 @@ async fn process_inbound_substream<TSpec: EthSpec>(
substream_closed = true;
}
}
} else if matches!(item, RPCCodedResponse::StreamTermination(_)) {
// The sender closed the stream before us, ignore this.
} else {
// we have more items after a closed substream, report those as errors
errors.push(RPCError::InternalError(