Closed digitalextremist closed 8 years ago
This is old. Can we please review and close if no longer useful?
I'm concerned that this behaviour wouldn't allow the user to handle the case explicitly. I think this is something we should revisit in the future, but for now I'm going to close this PR.
Agreed, will re-raise in future if needed. But will probably implement a different "dynamic rescue" allowing injection of specialized rescues if needed.
Adjusts/replaces #61 and closes #62.
@halorgium, I believe this is a good way to handle
Errno::ETIMEDOUT
gracefully -- return how much was written, rather than passing along a "crash" ... This might be flawed reasoning however.Please consider: If it is necessary to be sure something crossed the wire, the upstream needs to check
total_written
is valid. But for those who don't care about the outcome per se, there is no exception raised to take out an actor.My thought is that an actor's life can be spared, and whatever ought to run after a response is written can be run. For example, I save state and do some per-connection cleanup which a termination is not. Whether the transfer was correct is the responsibility of upstream code, if high accuracy is needed, but for the majority of cases, accuracy is optional.