-
Notifications
You must be signed in to change notification settings - Fork 7
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
Abort is not implemented #3
Comments
Spec is not clear if both HaProxy and Agent can send Abort. If Haproxy send a abort frame, the current fragmented buffer should be discard. Current HandleStream implementation cannot be stopped. If it were possible, i think of two possibles cases before sending Disconnect frame (again not clear in the spec) :
SetVariable data type are synchronous, if the binary one was read from a stream while sending the fragment frame and the stream failed, agent may send an abort frame. Do you have a better understanding of the spec and possible evolution ? |
I agree, the spec is not clear about whether an agent can send an Abort. It only shows an example of a Notify frame from HAProxy aborting, so I think that's all that can be implemented for now. I have accepted your pull request, thanks! |
Looking at the spec again, there is an example of the agent aborting incoming fragments from HAProxy:
I think this could happen if the agent code "cancels" the stream. This might be implemented as a side effect of cancelling the stream (related to #2) if there are unprocessed UNSET frames and the FIN flag has not been received yet. |
It looks like the agent should send an ACK frame with the ABORT flag set to tell HAProxy that the agent wants to stop receiving UNSET frames when the payload is fragmented. I suppose the user would determine when to do this, and would need a function that sets this in motion, possibly a delegate that's passed into HandleStream, where some logic is checked to know whether to abort. It might even be beneficial to leave this unimplemented until someone with a real use case chimes in. |
The SPOE specification defines an "Abort" flag on the metadata field as:
This is not yet implemented in this library.
The text was updated successfully, but these errors were encountered: