Skip to content

Commit 4825ebf

Browse files
committed
f Improve stop() documentation
1 parent 9fa0d70 commit 4825ebf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,10 @@ pub struct Node {
468468

469469
impl Node {
470470
/// Starts the necessary background tasks, such as handling events coming from user input,
471-
/// LDK/BDK, and the peer-to-peer network. After this returns, the [`Node`] instance can be
472-
/// controlled via the provided API methods in a thread-safe manner.
471+
/// LDK/BDK, and the peer-to-peer network.
472+
///
473+
/// After this returns, the [`Node`] instance can be controlled via the provided API methods in
474+
/// a thread-safe manner.
473475
pub fn start(&self) -> Result<(), Error> {
474476
// Acquire a run lock and hold it until we're setup.
475477
let mut run_lock = self.running.write().unwrap();
@@ -484,6 +486,8 @@ impl Node {
484486
}
485487

486488
/// Disconnects all peers, stops all running background tasks, and shuts down [`Node`].
489+
///
490+
/// After this returns most API methods will return [`Error::NotRunning`].
487491
pub fn stop(&self) -> Result<(), Error> {
488492
let mut run_lock = self.running.write().unwrap();
489493
if run_lock.is_none() {

0 commit comments

Comments
 (0)