iodine 0.7.50 → 0.7.52
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 +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/CHANGELOG.md +12 -1
- data/ext/iodine/fio.c +1 -1
- data/ext/iodine/iodine.c +1 -1
- data/ext/iodine/iodine_connection.c +7 -3
- data/ext/iodine/iodine_http.c +1 -1
- data/lib/iodine/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a785781b6a34e3c24c4a1f66e3d6ab25b3bee3cbd7021060182e85a10957e907
|
4
|
+
data.tar.gz: 8f3df880cc02eb1e1a139c4a4e4b3c9e37c3240f31bc205ceea69b000a8ca33f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eedc0f42ce25b27090b61a138d03a8e0a092b9f44a297396e354fea57091b7028de59ad76e9e7818c6ddd44120216a0fa776ed106f86386757f169f16c05289b
|
7
|
+
data.tar.gz: f279e9c69f22e7361f300a561dc9310a026d128a319497e4ac170ca63cab875d67d219d688380b9f51894e4b5b298fb125f38cc0fbe82171ff1e3d25a6e4767f
|
data/.github/workflows/ruby.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,18 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
6
6
|
|
7
7
|
## Changes:
|
8
8
|
|
9
|
-
|
9
|
+
|
10
|
+
#### Change log v.0.7.52 (2022-12-10)
|
11
|
+
|
12
|
+
**Fix**: Fixes `Iodine.unsubscribe` which failed when a symbol was supplied. Credit to Alexander Pavlenko (@raxoft) for opening issue #134.
|
13
|
+
|
14
|
+
**Fix**: Fixes `Iodine.is_worker` which gave an incorrect answer due to a copy & paste error. Credit to Alexander Pavlenko (@raxoft) for opening PR #133.
|
15
|
+
|
16
|
+
#### Change log v.0.7.51 (2022-12-03)
|
17
|
+
|
18
|
+
**Fix**: Fixes CPU spin error caused by an uncaught integer overflow. Credit to Alexander Pavlenko (@AlexanderPavlenko) for opening issue #132.
|
19
|
+
|
20
|
+
#### Change log v.0.7.50 (2022-10-29)
|
10
21
|
|
11
22
|
**Fix**: Fixes some compatibility issues with Rack 3.0. Credit to @taku0 for opening issue #131.
|
12
23
|
|
data/ext/iodine/fio.c
CHANGED
@@ -1025,7 +1025,7 @@ static void fio_defer_thread_wait(void) {
|
|
1025
1025
|
if (fio_defer_has_queue())
|
1026
1026
|
pthread_setspecific(static_throttle_key, (void *)1);
|
1027
1027
|
else if (static_throttle < FIO_DEFER_THROTTLE_LIMIT)
|
1028
|
-
pthread_setspecific(static_throttle_key, (void *)(static_throttle << 1));
|
1028
|
+
pthread_setspecific(static_throttle_key, (void *)((static_throttle << 1) | 1));
|
1029
1029
|
}
|
1030
1030
|
}
|
1031
1031
|
|
data/ext/iodine/iodine.c
CHANGED
@@ -312,7 +312,7 @@ static VALUE iodine_master_is(VALUE self) {
|
|
312
312
|
* a single process mode (the master is also a worker), `false` otherwise.
|
313
313
|
*/
|
314
314
|
static VALUE iodine_worker_is(VALUE self) {
|
315
|
-
return
|
315
|
+
return fio_is_worker() ? Qtrue : Qfalse;
|
316
316
|
}
|
317
317
|
|
318
318
|
/**
|
@@ -497,6 +497,7 @@ Ruby Connection Methods - Pub/Sub
|
|
497
497
|
***************************************************************************** */
|
498
498
|
|
499
499
|
typedef struct {
|
500
|
+
VALUE channel_org;
|
500
501
|
VALUE channel;
|
501
502
|
VALUE block;
|
502
503
|
fio_match_fn pattern;
|
@@ -506,7 +507,7 @@ typedef struct {
|
|
506
507
|
/** Tests the `subscribe` Ruby arguments */
|
507
508
|
static iodine_sub_args_s iodine_subscribe_args(int argc, VALUE *argv) {
|
508
509
|
|
509
|
-
iodine_sub_args_s ret = {.channel = Qnil, .block = Qnil};
|
510
|
+
iodine_sub_args_s ret = {.channel_org = Qnil, .channel = Qnil, .block = Qnil};
|
510
511
|
VALUE rb_opt = 0;
|
511
512
|
|
512
513
|
switch (argc) {
|
@@ -534,7 +535,7 @@ static iodine_sub_args_s iodine_subscribe_args(int argc, VALUE *argv) {
|
|
534
535
|
rb_raise(rb_eArgError, "method accepts 1 or 2 arguments.");
|
535
536
|
return ret;
|
536
537
|
}
|
537
|
-
|
538
|
+
ret.channel_org = ret.channel;
|
538
539
|
if (ret.channel == Qnil || ret.channel == Qfalse) {
|
539
540
|
rb_raise(rb_eArgError,
|
540
541
|
"a target (:to) subject / stream / channel is required.");
|
@@ -652,7 +653,7 @@ static VALUE iodine_pubsub_subscribe(int argc, VALUE *argv, VALUE self) {
|
|
652
653
|
iodine_sub_add(&sub_global, sub);
|
653
654
|
fio_unlock(&sub_lock);
|
654
655
|
}
|
655
|
-
return args.
|
656
|
+
return args.channel_org;
|
656
657
|
}
|
657
658
|
|
658
659
|
// clang-format off
|
@@ -682,6 +683,9 @@ static VALUE iodine_pubsub_unsubscribe(VALUE self, VALUE name) {
|
|
682
683
|
s_lock = &c->lock;
|
683
684
|
subs = &c->subscriptions;
|
684
685
|
}
|
686
|
+
if (TYPE(name) == T_SYMBOL)
|
687
|
+
name = rb_sym2str(name);
|
688
|
+
Check_Type(name, T_STRING);
|
685
689
|
fio_lock(s_lock);
|
686
690
|
ret = iodine_sub_unsubscribe(subs, IODINE_RSTRINFO(name));
|
687
691
|
fio_unlock(s_lock);
|
data/ext/iodine/iodine_http.c
CHANGED
@@ -477,7 +477,7 @@ Handling the HTTP response
|
|
477
477
|
static int for_each_header_data(VALUE key, VALUE val, VALUE h_) {
|
478
478
|
http_s *h = (http_s *)h_;
|
479
479
|
// fprintf(stderr, "For_each - headers\n");
|
480
|
-
if (TYPE(val) == T_NIL)
|
480
|
+
if (TYPE(val) == T_NIL || TYPE(key) == T_NIL)
|
481
481
|
return ST_CONTINUE;
|
482
482
|
if (TYPE(val) == T_ARRAY)
|
483
483
|
goto array_style_multi_value;
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iodine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.52
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10
|
11
|
+
date: 2022-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -246,7 +246,7 @@ licenses:
|
|
246
246
|
metadata:
|
247
247
|
allowed_push_host: https://rubygems.org
|
248
248
|
post_install_message: |-
|
249
|
-
Thank you for installing Iodine 0.7.
|
249
|
+
Thank you for installing Iodine 0.7.52.
|
250
250
|
Remember: if iodine supports your business, it's only fair to give value back (code contributions / donations).
|
251
251
|
rdoc_options: []
|
252
252
|
require_paths:
|