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

SPSP Receiver Rejects final STREAM packet #68

Closed
sappenin opened this issue May 23, 2019 · 2 comments
Closed

SPSP Receiver Rejects final STREAM packet #68

sappenin opened this issue May 23, 2019 · 2 comments

Comments

@sappenin
Copy link
Contributor

When making a STREAM payment to the SPSP receiver, it appears the SPSP receiver is rejecting the final STREAM packet (which is probably trying to close the STREAM).

For example, if an SPSP sender sends 1 units (in a 1-packet STREAM), then the first packet (Prepare with 1 units) works, and fulfills. But then there is a 2nd prepare (with amount=0), and the SPSP receiver always rejects this packet with an F99 error code.

Note also that the triggeredBy in this reject packet is empty, but should be the ILP address of the SPSP receiver.

@emschwartz
Copy link
Member

This happens because the ConnectionClose frame is sent separately from the last packet with money in it (see the code here). It would be better if it recognized that a specific packet would be the last (assuming it's fulfilled) and send the closing frame with the last bit of money.

@kincaidoneil
Copy link
Member

The STREAM sender uses a random condition in the packet with connection close frame, so it will always be rejected. I think this behavior is preferable to the final money packet, since there's no way to know for sure if that packet will be fulfilled -- you might need to try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants