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 CHANGED
@@ -3,5 +3,6 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in protoplasm.gemspec
4
4
  gemspec :name => 'protoplasm-em-server'
5
5
  gemspec :name => 'protoplasm-blocking-client'
6
+
6
7
  gem 'bundler_push_host'
7
8
  gem 'geminabox'
@@ -49,15 +49,15 @@ module Protoplasm
49
49
  socket.flush
50
50
  fetch_objects = true
51
51
  while fetch_objects
52
- response_byte = socket.read(1)
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.read(8)
58
+ len_buf = socket.sysread(8)
59
59
  len = len_buf.unpack("Q").first
60
- data = socket.read(len)
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
@@ -1,3 +1,3 @@
1
1
  module Protoplasm
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Hull