Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "stop" API method #2233

Merged
merged 4 commits into from
Apr 13, 2022
Merged

Add a "stop" API method #2233

merged 4 commits into from
Apr 13, 2022

Conversation

sstone
Copy link
Member

@sstone sstone commented Apr 12, 2022

This API call was added for certain uses cases where killing the process was impractical but internally it just calls sys.exit().
Eclair is designed to shutdown cleanly when its process is killed and this is still the recommended way of stopping it.

This API call was added for certain uses cases where killing the process was impractical but internally it just calls `sys.exit()`.
Eclair is designed to shutdown cleanly when its process is killed and this is still the recommended way of stopping it.
@sstone sstone requested a review from t-bast April 12, 2022 12:07
@@ -559,4 +561,12 @@ class EclairImpl(appKit: Kit) extends Eclair with Logging {
case Attempt.Failure(cause) => Future.successful(SendOnionMessageResponse(sent = false, failureMessage = Some(s"the `content` field is invalid, it must contain encoded tlvs: ${cause.message}"), response = None))
}
}

override def stop(exitCode: Int): Future[Unit] = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't have provided the exitCode as parameter. We should use 0 as this is a graceful stop.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 974a73c

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this to the release notes and to eclair-cli?

t-bast
t-bast previously approved these changes Apr 12, 2022
@sstone sstone merged commit 787c51a into master Apr 13, 2022
@sstone sstone deleted the rpc-stop branch April 13, 2022 07:48
t-bast added a commit that referenced this pull request Dec 1, 2022
The release introduces a few API changes:

- channelbalances retrieves information about the balances of all local
  channels (#2196)
- channelbalances and usablebalances return a shortIds object instead
  of a single shortChannelId (#2323)
- stop stops eclair: please note that the recommended way of stopping
  eclair is simply to kill its process (#2233)
- rbfopen lets the initiator of a dual-funded channel RBF the funding
  transaction (#2275)
- listinvoices and listpendinginvoices now accept --count and --skip
  parameters to limit the number of retrieved items (#2474)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants