cln-grpc: Do not log an error when called with --help

Changelog-None
This commit is contained in:
Christian Decker 2022-04-07 17:22:36 +02:00 committed by Rusty Russell
parent fbcdbe8842
commit 767da45037

View File

@ -176,7 +176,8 @@ where
})) }))
.await? .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 { match input.next().await {
@ -192,7 +193,12 @@ where
.await? .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); let (wait_handle, _) = tokio::sync::broadcast::channel(1);