rakie 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rakie/channel.rb +15 -4
- data/lib/rakie/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: 6aa5c872ec3bdf47d4f33f08f12f6ba6c3521553c9411c284d01b5efc6a63431
|
4
|
+
data.tar.gz: 0ed904078c4aa1bdbf6d9564be3b381a5ae6ca1c2831256c2fadff5cd449c81d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80823efc97c0d28c64d0871149118a5df0bebd19623a7b7088b9831218e8e0cee8e8a32901a010af3ffdb5e24ce86d5892dac8f5638541427e151e60209738c2
|
7
|
+
data.tar.gz: 9c747c282c958a45b307eba5e9bf451f513c8337106a4c1aaf59b8b6b4809ce915607e91ca544af48149b9faa7418041fea03adf6fca06580014bd1c51765308
|
data/lib/rakie/channel.rb
CHANGED
@@ -20,7 +20,10 @@ module Rakie
|
|
20
20
|
end
|
21
21
|
|
22
22
|
rescue IO::EAGAINWaitReadable
|
23
|
-
Log.debug("Channel read
|
23
|
+
Log.debug("Channel read pending")
|
24
|
+
|
25
|
+
rescue IO::EWOULDBLOCKWaitReadable
|
26
|
+
Log.debug("Channel read pending")
|
24
27
|
|
25
28
|
rescue Exception => e
|
26
29
|
# Process the last message on exception
|
@@ -67,19 +70,27 @@ module Rakie
|
|
67
70
|
|
68
71
|
def on_write(io)
|
69
72
|
len = 0
|
73
|
+
offset = 0
|
70
74
|
|
71
75
|
begin
|
72
76
|
while @write_buffer.length > 0
|
73
77
|
len = io.write_nonblock(@write_buffer)
|
78
|
+
offset += len
|
74
79
|
@write_buffer = @write_buffer[len .. -1]
|
75
80
|
end
|
76
81
|
|
77
82
|
Log.debug("Channel write finished")
|
78
83
|
|
79
84
|
rescue IO::EAGAINWaitWritable
|
80
|
-
self.handle_write(
|
85
|
+
self.handle_write(offset)
|
86
|
+
|
87
|
+
Log.debug("Channel write pending")
|
88
|
+
return Event::HANDLE_CONTINUED
|
89
|
+
|
90
|
+
rescue IO::EWOULDBLOCKWaitWritable
|
91
|
+
self.handle_write(offset)
|
81
92
|
|
82
|
-
Log.debug("Channel write
|
93
|
+
Log.debug("Channel write pending")
|
83
94
|
return Event::HANDLE_CONTINUED
|
84
95
|
|
85
96
|
rescue
|
@@ -87,7 +98,7 @@ module Rakie
|
|
87
98
|
return Event::HANDLE_FAILED
|
88
99
|
end
|
89
100
|
|
90
|
-
self.handle_write(
|
101
|
+
self.handle_write(offset)
|
91
102
|
|
92
103
|
return Event::HANDLE_FINISHED
|
93
104
|
end
|
data/lib/rakie/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakit Liang
|
@@ -43,9 +43,9 @@ require_paths:
|
|
43
43
|
- lib
|
44
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '2.5'
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|