-
Notifications
You must be signed in to change notification settings - Fork 268
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
Add a "stop" API method #2233
Conversation
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.
@@ -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] = { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 974a73c
There was a problem hiding this 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
?
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)
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.