hiredis-client 0.22.2 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd9b778e1204bac29d3ca9ebea612bf117a1c60a3423d9a2ca8af95525ca081
4
- data.tar.gz: b24b71653afb4da0b6733f61272edb161983a2baedb48554a39be671056fb896
3
+ metadata.gz: 44d5aa10a6591293ac181ec3fa1c332909e3c3ac9cf7ca6b02b6ec8679979f2e
4
+ data.tar.gz: 8105c8f1f67115e1f53425b0800281ea1cea1e402f212eee3ec71ae9b562b78d
5
5
  SHA512:
6
- metadata.gz: 73280748aba20c1794d0e7cc1e8f92d62a5fe7495eb0284f9a38f766af1bf45e6fd2165b1dac0ef9ab035ca17466133d7fec8b326911eb64872837953ef2ce57
7
- data.tar.gz: c4f6ca4d2b079c1f022d83849c2efb6052b8157afb16349a297df1d1edb8baf40994d354bc271bbe8af137b67df5c2ca4b962f853da610bf7d5b44e8e09782c8
6
+ metadata.gz: 2d972fc4d85e5af707f49c1811f3c7f5d5e971733790ca6d27f73ea81aa601f84193efb1a0f11dc375ad8b6bd336ef1455ec1469078579bcb1a7f8be84373cdf
7
+ data.tar.gz: 0f4e87b7fa8175cc7ee291bce633634bb69b6e23b67fa157cd3ad0a1509f44806a6e6c193fb77b1ee562d6bec172398a052f0a522de085222357af590af07d01
@@ -719,7 +719,6 @@ static VALUE hiredis_flush(VALUE self) {
719
719
 
720
720
  static int hiredis_read_internal(hiredis_connection_t *connection, VALUE *reply) {
721
721
  void *redis_reply = NULL;
722
- int wdone = 0;
723
722
 
724
723
  // This struct being on the stack, the GC won't move nor collect that `stack` RArray.
725
724
  // We use that to avoid having to have a `mark` function with write barriers.
@@ -737,56 +736,32 @@ static int hiredis_read_internal(hiredis_connection_t *connection, VALUE *reply)
737
736
  return HIREDIS_FATAL_CONNECTION_ERROR; // Protocol error
738
737
  }
739
738
 
740
- if (redis_reply == NULL) {
741
- /* Write until the write buffer is drained */
742
- while (!wdone) {
743
- errno = 0;
744
-
745
- if (hiredis_buffer_write_nogvl(connection->context, &wdone) == REDIS_ERR) {
746
- return HIREDIS_FATAL_CONNECTION_ERROR; // Socket error
747
- }
748
-
749
- if (errno == EAGAIN) {
750
- int writable = 0;
751
-
752
- if (hiredis_wait_writable(connection->context->fd, &connection->write_timeout, &writable) < 0) {
753
- return HIREDIS_CLIENT_TIMEOUT;
754
- }
739
+ /* Read until there is a full reply */
740
+ while (redis_reply == NULL) {
741
+ errno = 0;
755
742
 
756
- if (!writable) {
757
- errno = EAGAIN;
758
- return HIREDIS_CLIENT_TIMEOUT;
759
- }
760
- }
743
+ if (hiredis_buffer_read_nogvl(connection->context) == REDIS_ERR) {
744
+ return HIREDIS_FATAL_CONNECTION_ERROR; // Socket error
761
745
  }
762
746
 
763
- /* Read until there is a full reply */
764
- while (redis_reply == NULL) {
765
- errno = 0;
747
+ if (errno == EAGAIN) {
748
+ int readable = 0;
766
749
 
767
- if (hiredis_buffer_read_nogvl(connection->context) == REDIS_ERR) {
768
- return HIREDIS_FATAL_CONNECTION_ERROR; // Socket error
750
+ if (hiredis_wait_readable(connection->context->fd, &connection->read_timeout, &readable) < 0) {
751
+ return HIREDIS_CLIENT_TIMEOUT;
769
752
  }
770
753
 
771
- if (errno == EAGAIN) {
772
- int readable = 0;
773
-
774
- if (hiredis_wait_readable(connection->context->fd, &connection->read_timeout, &readable) < 0) {
775
- return HIREDIS_CLIENT_TIMEOUT;
776
- }
777
-
778
- if (!readable) {
779
- errno = EAGAIN;
780
- return HIREDIS_CLIENT_TIMEOUT;
781
- }
782
-
783
- /* Retry */
784
- continue;
754
+ if (!readable) {
755
+ errno = EAGAIN;
756
+ return HIREDIS_CLIENT_TIMEOUT;
785
757
  }
786
758
 
787
- if (redisGetReplyFromReader(connection->context, &redis_reply) == REDIS_ERR) {
788
- return HIREDIS_FATAL_CONNECTION_ERROR; // Protocol error
789
- }
759
+ /* Retry */
760
+ continue;
761
+ }
762
+
763
+ if (redisGetReplyFromReader(connection->context, &redis_reply) == REDIS_ERR) {
764
+ return HIREDIS_FATAL_CONNECTION_ERROR; // Protocol error
790
765
  }
791
766
  }
792
767
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiredis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.2
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-22 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.22.2
19
+ version: 0.23.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.22.2
26
+ version: 0.23.0
27
27
  description:
28
28
  email:
29
29
  - jean.boussier@gmail.com
@@ -79,7 +79,6 @@ files:
79
79
  - ext/redis_client/hiredis/vendor/test.c
80
80
  - ext/redis_client/hiredis/vendor/test.sh
81
81
  - ext/redis_client/hiredis/vendor/win32.h
82
- - hiredis-client.gemspec
83
82
  - lib/hiredis-client.rb
84
83
  - lib/redis_client/hiredis_connection.rb
85
84
  homepage: https://github.com/redis-rb/redis-client
@@ -105,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
104
  - !ruby/object:Gem::Version
106
105
  version: '0'
107
106
  requirements: []
108
- rubygems_version: 3.5.9
107
+ rubygems_version: 3.0.3.1
109
108
  signing_key:
110
109
  specification_version: 4
111
110
  summary: Hiredis binding for redis-client
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../lib/redis_client/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "hiredis-client"
7
- spec.version = RedisClient::VERSION
8
- spec.authors = ["Jean Boussier"]
9
- spec.email = ["jean.boussier@gmail.com"]
10
-
11
- spec.summary = "Hiredis binding for redis-client"
12
- spec.homepage = "https://github.com/redis-rb/redis-client"
13
- spec.license = "MIT"
14
- spec.required_ruby_version = ">= 2.6.0"
15
-
16
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
-
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = spec.homepage
20
- spec.metadata["changelog_uri"] = File.join(spec.homepage, "blob/master/CHANGELOG.md")
21
-
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
- `git ls-files -z`.split("\x0").reject do |f|
26
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|benchmark)/|\.(?:git|rubocop))})
27
- end
28
- end
29
- spec.require_paths = ["lib"]
30
- spec.extensions = ["ext/redis_client/hiredis/extconf.rb"]
31
-
32
- spec.add_runtime_dependency "redis-client", RedisClient::VERSION
33
- end