protoplasm-blocking-client 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/lib/protoplasm/client/blocking_client.rb +5 -3
- data/lib/protoplasm/version.rb +1 -1
- metadata +3 -3
data/Gemfile
CHANGED
@@ -49,15 +49,15 @@ module Protoplasm
|
|
49
49
|
socket.flush
|
50
50
|
fetch_objects = true
|
51
51
|
while fetch_objects
|
52
|
-
response_byte = socket.
|
52
|
+
response_byte = socket.sysread(1)
|
53
53
|
response_code = response_byte.unpack("C").first
|
54
54
|
case response_code
|
55
55
|
when Types::Response::NORMAL
|
56
56
|
fetch_objects = !type.void?
|
57
57
|
if fetch_objects
|
58
|
-
len_buf = socket.
|
58
|
+
len_buf = socket.sysread(8)
|
59
59
|
len = len_buf.unpack("Q").first
|
60
|
-
data = socket.
|
60
|
+
data = socket.sysread(len)
|
61
61
|
obj = type.response_class.decode(data)
|
62
62
|
yield obj if block_given?
|
63
63
|
end
|
@@ -70,6 +70,8 @@ module Protoplasm
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
obj
|
73
|
+
rescue EOFError
|
74
|
+
@socket = nil
|
73
75
|
end
|
74
76
|
end
|
75
77
|
end
|
data/lib/protoplasm/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protoplasm-blocking-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Josh Hull
|