Skip to content

Commit

Permalink
cln-grpc: Do not log an error when called with --help
Browse files Browse the repository at this point in the history
Changelog-None
  • Loading branch information
cdecker authored and rustyrussell committed Apr 8, 2022
1 parent fbcdbe8 commit 767da45
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ where
}))
.await?
}
o => return Err(anyhow!("Got unexpected message {:?} from lightningd", o)),
Some(o) => return Err(anyhow!("Got unexpected message {:?} from lightningd", o)),
None => return Err(anyhow!("Lost connection to lightning expecting getmanifest")),
};

match input.next().await {
Expand All @@ -192,7 +193,12 @@ where
.await?
}

o => return Err(anyhow!("Got unexpected message {:?} from lightningd", o)),
Some(o) => return Err(anyhow!("Got unexpected message {:?} from lightningd", o)),
None => {
// If we are being called with --help we will get
// disconnected here. That's expected, so don't
// complain about it.
}
};

let (wait_handle, _) = tokio::sync::broadcast::channel(1);
Expand Down

0 comments on commit 767da45

Please sign in to comment.