Merge bitcoindevkit/rust-electrum-client#107: Retry client should return AlreadySubscribed error

3a61037733 Retry client should return AlreadySubscribed error (Riccardo Casatta)

Pull request description:

  Users may leverage the Error to avoid remembering client-side the subscription status. eg. Always subscribing and calling script_pop in case AlreadySubscribed is returned.

  Backport for version 0.14.0

ACKs for top commit:
  afilini:
    ACK 3a61037733

Tree-SHA512: d6542227ca03b9f3755cec05115f86de54789cfc49fc87b603b653e0458f6b03ae9fea57fa110221395a4e33cf62a5b2bd7639c4269ae5291e4c92c99ef41eba
This commit is contained in:
Alekos Filini 2023-05-14 12:56:35 +02:00
commit 27eb4d0cb0
No known key found for this signature in database
GPG Key ID: 431401E4A4530061

View File

@ -49,7 +49,7 @@ macro_rules! impl_inner_call {
drop(read_client);
match res {
Ok(val) => return Ok(val),
Err(Error::Protocol(_)) => {
Err(Error::Protocol(_) | Error::AlreadySubscribed(_)) => {
return res;
},
Err(e) => {