Closed rajmaniar closed 3 years ago
The future chaining that's going on with _future I don't believe will work as expected since when the Future is completed with an error the successor will never be called.
That is good point.
I believe that one possible fix is to wrap return future. We need to keep _future in connection.dart, allays without error and we yield error in future that gets to user.
I don't really understand what purpose _future
serves but what you're suggesting sounds good to me.
_future serves so that we can stack multiple request over same socket and then make repose, to appropriate caller when response is received.
It makes high performance example to work.
I made some modifications. @rajmaniar , can you run some test on your side and report if that improves this issue.
The changes seem to work well, thanks!
fix released with v2.1.0
There appears to be a breaking bug where once the client returns a
RedisError
the Connection is permanently broken.It's very easy to reproduce, just run the code below:
The
Get
commands fail with the same error as theGARBAGE
commandIt looks like the bug was introduced here: https://github.com/ra1u/redis-dart/commit/3110c8eadb6b2b374ce2390f125110ad2869f58c#diff-0169e92992be999e9a9de7482d45357ffeaa22f5a9f2adaa974fafd3c62ab661L41
The future chaining that's going on with
_future
I don't believe will work as expected since when the Future is completed with an error the successor will never be called.