ws_client 0.1.4 → 0.1.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: 1e3d5ce819fc7a4df3bc7b97af49b0884856b858
4
- data.tar.gz: f99cf3a5e40be8f9c700216a0130658f09b66b35
3
+ metadata.gz: 9832be21bf9d0c9e3ad56f8316e9fad17f355854
4
+ data.tar.gz: 9dd2d13ee3d1d3317669c2ca95fe747f4786deaa
5
5
  SHA512:
6
- metadata.gz: 7c161839d9cfb1d6f85f2d3c862e46f08ba5e4ae9b167446ad705f7c56d09fbee571893a9e5ecde6c5d89549a62a46e1cc6db10d0c49f7547da552476b32a19f
7
- data.tar.gz: 4d62a8043949076f6b3b109ef8477fb691ac9d88524f21c2f5fb0a02e2c772926102147e420ffc634cdf1d51d24b817f4e167dd89193d298f35e93f5b20f65cb
6
+ metadata.gz: c490feb80923e1331596ab66fbcc602baa5a98be2146706c74b3fd77c8f9892ae44c24aeef19280f7150ec4b487113ceca0c92972dd2f203a1a4f34ef7e8a250
7
+ data.tar.gz: fe962b0b415adfe7e6dc366079ea42ebb2944be10854d750e3299d4bcb96d5bfd54b99df0cd7cfe1f6fbed17f8bd0c88ddcd9d2453bfe797d6ac41182db5bc9c
@@ -1,3 +1,3 @@
1
1
  module WsClient
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/ws_client.rb CHANGED
@@ -48,7 +48,9 @@ module WsClient
48
48
  ctx
49
49
  end
50
50
 
51
- @socket = ::OpenSSL::SSL::SSLSocket.new(@socket, ssl_context)
51
+ # Keep a handle to the TCPSocket, because the SSLSocket will not clean it up for us.
52
+ @tcp_socket = @socket
53
+ @socket = ::OpenSSL::SSL::SSLSocket.new(@tcp_socket, ssl_context)
52
54
  @socket.connect
53
55
  end
54
56
 
@@ -86,7 +88,9 @@ module WsClient
86
88
  ensure
87
89
  @closed = true
88
90
  @socket.close if @socket
91
+ @tcp_socket.close if @tcp_socket
89
92
  @socket = nil
93
+ @tcp_socket = nil
90
94
  end
91
95
 
92
96
  def closed?
@@ -196,7 +200,9 @@ module WsClient
196
200
  ensure
197
201
  @closed = true
198
202
  @socket.close if @socket
203
+ @tcp_socket.close if @tcp_socket
199
204
  @socket = nil
205
+ @tcp_socket = nil
200
206
  Thread.kill @thread if @thread
201
207
  end
202
208
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ws_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-08-19 00:00:00.000000000 Z
12
+ date: 2016-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler