-
Notifications
You must be signed in to change notification settings - Fork 121
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
rpc: try to catch EOF error from lnd sendpayment #1217
Conversation
Pull Request Test Coverage Report for Build 12038637695Details
💛 - Coveralls |
Not sure if I'm doing something wrong, but I'm getting this error.
|
Has |
Are you running |
I'm running litd. I didn't think you could use sendpayment with tapd directly. |
Yeah, you can't. Just trying to find out what's wrong here... Is it possible you have an old
|
I was running inside docker, so I don't think that was the issue. |
Updated the PR body with more context. |
Sorry, I accidentally was not using I can confirm this fix works! |
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.
Thanks for the fix! LGTM 🎉
@@ -7193,7 +7193,12 @@ func (r *rpcServer) SendPayment(req *tchrpc.SendPaymentRequest, | |||
|
|||
update, err := updateStream.Recv() | |||
if err != nil { | |||
return err | |||
// Stream is closed; no more updates. | |||
if err == io.EOF { |
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.
nit: Use errors.Is()
instead? Though it shouldn't really be wrapped at this point, so doesn't matter too much.
A user observed that when using Python, they get an EOF even if the payment succeeds. My guess is that
lnd
has hung up, then we try to recv and get an EOF error. With this PR, we try to catch that EOF error and just returnnil
.One other idea: do we need to call
CloseSend
at the very end or in a defer?Fixes: #1216