return instead of ignore error (#1287)

* return error instead of swallow error

* changelog

Co-authored-by: Bryan Stitt <bryan@satoshiandkin.com>
This commit is contained in:
Bryan Stitt 2022-05-23 11:58:41 -07:00 committed by GitHub
parent fe4de841c3
commit 9ed9395c2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,7 @@
- Add `TransactionReceipt::to` and `TransactionReceipt::from`
[#1184](https://github.com/gakonst/ethers-rs/pull/1184)
- Add `From<H160>` and From<Vec<H160>> traits to `ValueOrArray<H160>` [#1199](https://github.com/gakonst/ethers-rs/pull/1200)
- Fix handling of Websocket connection errors [#1287](https://github.com/gakonst/ethers-rs/pull/1287)
## ethers-contract-abigen

View File

@ -401,8 +401,9 @@ where
// Handle ws messages
resp = self.ws.next() => match resp {
Some(Ok(resp)) => self.handle(resp).await?,
// TODO: Log the error?
Some(Err(_)) => {},
Some(Err(_)) => {
return Err(ClientError::UnexpectedClose);
}
None => {
return Err(ClientError::UnexpectedClose);
},