- 29 Aug, 2022 1 commit
-
-
Björn Svensson authored
-
- 26 Aug, 2022 1 commit
-
-
michael-grunder authored
In f69fac76, our async onConnect callback was improved to take a non-const redisAsyncContext allowing it to be reentrant. Unfortunately, this is a breaking change we can't make until hiredis v2.0.0. This commit creates a separate callback member and corresponding function that allows us to use the new functionality, while maintaining our existing API for legacy code. Fixes #1086
-
- 08 Jul, 2022 1 commit
-
-
Kristján Valur Jónsson authored
-
- 03 Feb, 2022 1 commit
-
-
Björn Svensson authored
Redis responds to an unsubscribe with one or many replies, depending on the current subscribe state. When channels/patterns names are provided in a command each given name will trigger a reply even if duplicated or not subscribed to. To know when we can return from the subscribed state we need to do bookkeeping on pending additional unsubscribe replies, and make sure we receive them all before switching state.
-
- 02 Feb, 2022 1 commit
-
-
Björn Svensson authored
-
- 28 Jan, 2022 1 commit
-
-
Bjorn Svensson authored
* No reuse of the previous reply callback When multiple replies are parsed from a socket in one read a previously found callback might get reused when the current reply has no known callback. This can be triggered by the added testcase which unsubscribe to subscribed (A,B) and a non-subscribed channel (X). Without this correction a callback for wrong channel is called. - In 'unsubscribe B X A', B's callback is called when handling X. - Now this is not done, i.e. there is no callback called for X. * Re-push monitor callback for each reply MONITORING used the same callback for all replies while parsing multiple responses. This handling was changed to avoid calling the wrong callback in some scenarios. Now also change monitorings repush to work with this change. Includes an added async monitoring testcase.
-
- 18 Jan, 2022 1 commit
-
-
Bjorn Svensson authored
* Add test of async commands after unsubscribe Verify that commands are handled after unsubscribing from a channel. A command is sent before the `unsubscribe` response is received, which currently triggers an assert in async.c:567: `redisProcessCallbacks: Assertion `(c->flags & REDIS_SUBSCRIBED || c->flags & REDIS_MONITORING)' failed.` * Handle async commands after an unsubscribe When unsubscribing from the last channel we move from the `subscribe` state to a normal state. These states uses different holders for the command callback information. By moving the callback info during the state change the callback order can be maintained.
-
- 11 Jan, 2022 1 commit
-
-
Bjorn Svensson authored
* Add test of command timeout during pubsub A timeout of a non-subscribe command will be ignored during pubsub. It will be handled as an idle timeout and a response is awaited for. * Correction for command timeout during pubsub Disconnect when a sent non-subscribe command triggers a timeout.
-
- 22 Dec, 2021 2 commits
-
-
sundb authored
-
Bjorn Svensson authored
RESP3 allows sending commands in parallell with pubsub handling and these commands might get responded with a REDIS_REPLY_ARRAY. This conflicts with the pubsub response handling for RESP2 and results in a faulty state when using RESP3. Add functionality to keep track of PUSH/RESP3 support on the connection and only expect the message type REDIS_REPLY_PUSH as subscribe messages when once seen.
-
- 16 Dec, 2021 1 commit
-
-
Bjorn Svensson authored
* Handle PING during pubsub in RESP2 * Rename invalid callback list Some commands are valid to send during a subscribe in RESP2, and most in RESP3. Renaming the callback list from `invalid` to `replies` to detail this fact. * Fix review comment
-
- 01 Dec, 2021 1 commit
-
-
Bjorn Svensson authored
* Include `unsubscribe` as a subscribe reply in RESP3 By providing the (p)unsubscribe message via the subscribe callback, instead of via the push callback, we get the same behavior in RESP3 as in RESP2. * Add asynchronous test for pubsub using RESP3 The testcase will subscribe to a channel, and via a second client a message is published to the channel. After receiving the message the testcase will unsubscribe and disconnect. This RESP3 testcase reuses the subscribe callback from the RESP2 testcase to make sure we have a common behavior.
-
- 11 Jul, 2021 1 commit
-
-
Meir Shpilraien (Spielrein) authored
When set hiredis will not automatically free replies in an async context, and the replies must be freed instead by the user. Co-authored-by:
Michael Grunder <michael.grunder@gmail.com>
-
- 17 Jun, 2021 1 commit
-
-
michael-grunder authored
-
- 08 Apr, 2021 1 commit
-
-
Kristján Valur Jónsson authored
-
- 26 Jan, 2021 1 commit
-
-
Bjorn Svensson authored
Unless the callback is pushed to the list it will trigger an assert in redisProcessCallbacks() when the response arrives. This change let the user get an early error instead, available in the async context directly.
-
- 25 Jan, 2021 1 commit
-
-
Bjorn Svensson authored
Replacing the get & release functions with an initiation function. Simplifies the code and will make sure we run subscription callbacks in OOM scenarios.
-
- 23 Sep, 2020 1 commit
-
-
shiyuge authored
-
- 31 Jul, 2020 1 commit
-
-
Michael Grunder authored
Addresses #642
-
- 26 Jul, 2020 1 commit
-
-
valentinogeron authored
Add an additional timeout so the user has a convenient way of controlling distinct connect and command timeouts
-
- 20 Jul, 2020 1 commit
-
-
Michael Grunder authored
Proper support for RESP3 PUSH messages. By default, PUSH messages are now intercepted and the reply memory freed. This means existing code should work unchanged when connecting to Redis >= 6.0.0 even if `CLIENT TRACKING` were then enabled. Additionally, we define two callbacks users can configure if they wish to handle these messages in a custom way: void redisPushFn(void *privdata, void *reply); void redisAsyncPushFn(redisAsyncContext *ac, void *reply); See #825
-
- 22 Jun, 2020 1 commit
-
-
OmriSteiner authored
Co-authored-by:
Omri Steiner <omri@insoundz.com>
-
- 22 May, 2020 1 commit
-
-
Michael Grunder authored
* Adds an indirection to every allocation/deallocation to allow users to plug in ones of their choosing (use custom functions, jemalloc, etc). * Gracefully handle OOM everywhere in hiredis. This should make it possible for users of the library to have more flexibility in how they handle such situations. * Changes `redisReaderTask->elements` from an `int` to a `long long` to prevent a possible overflow when transferring the task elements into a `redisReply`. * Adds a configurable `max elements` member to `redisReader` that defaults to 2^32 - 1. This can be set to "unlimited" by setting the value to zero.
-
- 21 May, 2020 1 commit
-
-
Michael Grunder authored
Fixes #815
-
- 10 Apr, 2020 1 commit
-
-
Nick Rivera authored
-
- 28 Jan, 2020 1 commit
-
-
Michael Grunder authored
Create allocation wrappers with a configurable OOM handler (defaults to abort()). See #752, #747
-
- 29 Aug, 2019 1 commit
-
-
Yossi Gottlieb authored
-
- 09 Aug, 2019 1 commit
-
-
Marcus Geelnard authored
Use _MSC_VER (instead of _WIN32) for things that are specific for Visual Studio. Also remove #include <winsock2.h> from hiredis.h, as it leaks too many symbols and defines into the global namespace, which is undesirable for a public interface header. Anyone who uses the the affected parts of the hiredis API needs to include the appropriate headers anyway in order to declare struct timeval variables.
-
- 22 Jul, 2019 1 commit
-
-
Odin Hultgren Van Der Horst authored
- Removed whitespace before newline - Removed win style newline
-
- 13 Apr, 2019 1 commit
-
-
jinjiazhang authored
-
- 11 Mar, 2019 1 commit
-
-
Mark Nunberg authored
This ensures that a disconnect occurs. This commit also ensures that disconnects will clean the socket even if the user is in no-auto-free mode
-
- 21 Feb, 2019 1 commit
-
-
Mark Nunberg authored
-
- 20 Feb, 2019 5 commits
-
-
Mark Nunberg authored
If callback was set before scheduleTimer was set (i..e before one of the attach()) calls.
-
Mark Nunberg authored
-
Mark Nunberg authored
-
Mark Nunberg authored
We changed this to `HIREDIS_SSL`
-
Mark Nunberg authored
-
- 26 Sep, 2018 2 commits
-
-
Mark Nunberg authored
-
Mark Nunberg authored
This retrieves the actual error which occurred, as getsockopt is not always reliable in this regard.
-
- 15 Jun, 2017 1 commit
-
-
amallia authored
-