-
Notifications
You must be signed in to change notification settings - Fork 33
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
[BUG]: Remove broken sockets from socket collection if write request fails #61
Comments
Does it make sense to also retry to write to a new socket? Or should that be handled by the caller? |
There is no retrying mechanism at all in the client right now and even though it's probably not hard to implement in that case, I'd like to leave this responsibility to the caller/user. This also would be a BC break, because callers won't get notified (by an exception) about broken streams anymore and an automatic retry is not what everyone wants in that case. But I also understand that a retry can totally make sense and would reduce efforts on the user's end. I do think about prefixed methods which will add a retry mechanism when sending requests, like: I'm trying to fix this bug by today and release v3.1.3. 🤞 |
Expected Behavior
When the attempt to write to a socket fails, because the socket is already closed, blocked or terminated, this socket must be removed from the socket collection, so subsequent requests will open new sockets for processing.
Actual Behavior
The broken socket is not removed from the socket collection and the client tries to reuse the broken socket for subsequent requests.
Steps to Reproduce the Problem
WriteFailedException
here https://github.com/hollodotme/fast-cgi-client/blob/v3.1.2/src/Sockets/Socket.php#L410)Specifications
Further comments
This issue emerged from brefphp/bref#713.
The text was updated successfully, but these errors were encountered: