rexpro 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 437d2e1d9f2ce37b553dac26e0b2af775d8b7c6f
4
- data.tar.gz: 81593681ee7a9115fcc574829138665a7a4c0ab7
3
+ metadata.gz: 2b625dbe780d7501c8edf102e13612f1825f07b5
4
+ data.tar.gz: c9a724543109d439ef1d67473296a2acf964400b
5
5
  SHA512:
6
- metadata.gz: 87e774e300890256b7cbe674c588808a69f12bb685f485bdc6e7a0d8554061ce33ebc32a025802808d65dd7abc568de959a34eb1fb967fc46717cb25c99e7d3f
7
- data.tar.gz: ad898a7b0f7c5fb8d6798c17f720e05b505bc636545469e93024c128ea9f00d9ddd8082dc6889494c66a68ebb47941c2a0394f56f039119dcf2a2b2fc067bc3a
6
+ metadata.gz: 10f1b58f59e07543393d51ea0e7eaa1aa8a64c7851ce00cfa891e5483b12a9356ac78088b35c2fbe0dfadd00e993471ec6e22f8dcf37a3632805dc3f1ba2bded
7
+ data.tar.gz: 1d3df5a87629ef4ae075af09ba3bcf3903fffacc502e1ef838203660ba75fd2a541a5144633c93168b87d615e43230ad6ae192b26fe25c72eea0872f12d50f25
data/lib/rexpro/client.rb CHANGED
@@ -38,6 +38,7 @@ module Rexpro
38
38
 
39
39
  Rexpro::Message.read_from(@socket).tap do |resp|
40
40
  if resp.request_uuid.bytes.to_a != req.request_uuid.bytes.to_a
41
+ @socket.close
41
42
  raise Rexpro::RexproException,
42
43
  "request uuid of response didn't match request"
43
44
  end
@@ -50,6 +51,10 @@ module Rexpro
50
51
  end
51
52
  rescue TCPTimeout::SocketTimeout => ex
52
53
  raise Rexpro::RexproException.new(ex)
54
+ rescue SystemCallError
55
+ # Lets not leave an open connection in a potentially bad state
56
+ @socket.close
57
+ raise
53
58
  end
54
59
 
55
60
  def new_session(opts = {})
@@ -1,3 +1,3 @@
1
1
  module Rexpro
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexpro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lann Martin