async-io 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/async/io/ssl_socket.rb +2 -2
- data/lib/async/io/stream.rb +5 -6
- data/lib/async/io/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7f9fd0c7ac3d55909e9d49bdefffadcb95fa6d22cce97266aa806cdedf8e42d
|
4
|
+
data.tar.gz: 46436128ec03245e175cc16b50b549b0aaaef7855136ee43fabc9ee9fe5cba0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b72f1b1a7de4fc5a3a8f597ab6f82ae1bda12b83ea2873e0f2c271660eddba1cecafe59de190e647936e7e0a272ceedef5541817ed2136927cb327b56324afc5
|
7
|
+
data.tar.gz: 2bac9e1ede1b00f5b2a614c270f6b2a609acc1108fc25b0a0e48288e9507bf95f9b72d5526bb6df7db028147ab03ba4ba8d1700dbc792fb1391021f1b3641acc
|
data/lib/async/io/ssl_socket.rb
CHANGED
@@ -73,11 +73,11 @@ module Async
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def self.wrap(socket, context)
|
76
|
-
io = @wrapped_klass.new(socket.to_io, context)
|
77
|
-
|
78
76
|
# We detach the socket from the reactor, otherwise it's possible to add the file descriptor to the selector twice, which is bad.
|
79
77
|
socket.reactor = nil
|
80
78
|
|
79
|
+
io = @wrapped_klass.new(socket.to_io, context)
|
80
|
+
|
81
81
|
# This ensures that when the internal IO is closed, it also closes the internal socket:
|
82
82
|
io.sync_close = true
|
83
83
|
|
data/lib/async/io/stream.rb
CHANGED
@@ -158,17 +158,16 @@ module Async
|
|
158
158
|
|
159
159
|
# Fills the buffer from the underlying stream.
|
160
160
|
def fill_read_buffer
|
161
|
-
Async.logger.debug(self){"fill_read_buffer..."}
|
162
|
-
|
163
161
|
# Can we read directly into the buffer? (Ruby doesn't support append, only replace):
|
164
|
-
if
|
165
|
-
|
162
|
+
if @read_buffer.empty?
|
163
|
+
if @io.read(@block_size, @read_buffer)
|
164
|
+
return true
|
165
|
+
end
|
166
|
+
elsif chunk = @io.read(@block_size)
|
166
167
|
@read_buffer << chunk
|
167
168
|
return true
|
168
169
|
end
|
169
170
|
|
170
|
-
Async.logger.debug(self){"@io.read -> #{chunk.inspect}"}
|
171
|
-
|
172
171
|
# We didn't read anything, so we must be at eof:
|
173
172
|
@eof = true
|
174
173
|
return false
|
data/lib/async/io/version.rb
CHANGED