1. 01 Jun, 2023 1 commit
  2. 16 Apr, 2023 1 commit
  3. 14 Apr, 2023 1 commit
  4. 14 Nov, 2022 1 commit
  5. 02 Nov, 2022 1 commit
    • michael-grunder's avatar
      CI fixes in preparation of release · 2b069573
      michael-grunder authored
      - Upgrade to actions/checkout@v3 as node 12 is being phased out.
      - Perform a manual dnf refresh on RockyLinux during setup.
      - Switch to official cygwin/cygwin-install-action
      2b069573
  6. 14 Oct, 2022 1 commit
    • Bjorn Svensson's avatar
      Fixup of PR734: Coverage of hiredis.c (#1124) · 3b15a04b
      Bjorn Svensson authored
      
      
      Improve coverage (#734)
      
      * Remove duplicate tests
      
      - double covered by:
        "Can parse RESP3 doubles"
      - bool covered via:
        "Can parse RESP3 bool"
      
      * Make (connect) timeout in test config general
      
      * Set error string in Unix connect with invalid timeout
      
      Restructure testcase since redisConnectWithTimeout() and
      redisConnectUnixWithTimeout() now behaves similar.
      
      * Use quiet flag in lcov/genhtml instead of piping to /dev/null
      
      * Fixup of redisCommandArgv test case
      
      * Update test case to match what it covers
      
      Use new test case info text since the previous one seemed copy&pasted.
      The sought coverage was the handling of the parent-chaining
      for a double object, which the test case now focuses on.
      Co-authored-by: default avatarAriel <ashtul@gmail.com>
      3b15a04b
  7. 27 Sep, 2022 1 commit
  8. 08 Sep, 2022 1 commit
    • michael-grunder's avatar
      Minor refactor · 560e6648
      michael-grunder authored
      Protect against a NULL pointer dereference, and remove unused write
      to a variable.
      560e6648
  9. 03 Sep, 2022 1 commit
    • Michael Grunder's avatar
      Use a windows specific keepalive function. (#1104) · 61b5b299
      Michael Grunder authored
      Use a windows specific keepalive function.
      
      While it is possible to toggle `TCP_KEEPALIVE` in windows via
      setsockopt, you have to use `WSAIoctl` to set the interval.
      
      Since `WSAIoctl` can actually do all of this in one call (toggle the
      option, and set the corresponding interval), just use that in Windows
      and avoid the call to `setsockopt` alltogether.
      
      Fixes: #1100
      61b5b299
  10. 01 Sep, 2022 1 commit
    • Björn Svensson's avatar
      Fix heap-buffer-overflow issue in redisvFormatCommad · 329eaf9b
      Björn Svensson authored
      A command with a faulty formatting string that lacks the
      conversion specifier results in a ASAN heap-buffer-overflow.
      This was due to that strchr() matches on null-termination,
      which triggers a continuation of the string parsing.
      329eaf9b
  11. 31 Aug, 2022 1 commit
  12. 29 Aug, 2022 2 commits
  13. 26 Aug, 2022 1 commit
    • michael-grunder's avatar
      Maintain backward compatibiliy withour onConnect callback. · 6a3e96ad
      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
      6a3e96ad
  14. 08 Jul, 2022 2 commits
  15. 05 Jul, 2022 2 commits
  16. 22 Apr, 2022 1 commit
  17. 03 Feb, 2022 1 commit
    • Björn Svensson's avatar
      Handle any pipelined unsubscribe in async · 7123b87f
      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.
      7123b87f
  18. 02 Feb, 2022 1 commit
  19. 28 Jan, 2022 1 commit
    • Bjorn Svensson's avatar
      Avoid incorrect call to the previous reply's callback (#1040) · be41ed60
      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.
      be41ed60
  20. 18 Jan, 2022 1 commit
    • Bjorn Svensson's avatar
      Allow sending commands after sending an unsubscribe (#1036) · f2ce5980
      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.
      f2ce5980
  21. 11 Jan, 2022 1 commit
    • Bjorn Svensson's avatar
      Correction for command timeout during pubsub (#1038) · ff860e55
      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.
      ff860e55
  22. 22 Dec, 2021 1 commit
    • Bjorn Svensson's avatar
      Handle array response in parallell with pubsub using RESP3 (#1014) · 58aacdac
      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.
      58aacdac
  23. 16 Dec, 2021 1 commit
    • Bjorn Svensson's avatar
      Support PING while subscribing (RESP2) (#1027) · d3384260
      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
      d3384260
  24. 01 Dec, 2021 1 commit
    • Bjorn Svensson's avatar
      Add asynchronous test for pubsub using RESP3 (#1012) · da5a4ff3
      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.
      da5a4ff3
  25. 17 Nov, 2021 1 commit
  26. 27 Oct, 2021 1 commit
  27. 10 Oct, 2021 2 commits
  28. 04 Oct, 2021 1 commit
  29. 26 Feb, 2021 8 commits