ws_client 0.1.2 → 0.1.3

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: d6c418fc7b686210fc3ea7d779fa8953b7990209
4
- data.tar.gz: a0843638a3b961aba33b3c89bf35add83a110c58
3
+ metadata.gz: ef6e9bbe3063b1e50ff6813a61f6248f9105942d
4
+ data.tar.gz: 48ac7c88fef1239965772efcf2e39db4de0687a7
5
5
  SHA512:
6
- metadata.gz: 717b41e9d41803e667c625b9f2b372db5e9cc8bb078176dfc801c0088f77cae419a7bf5917c3aba53a6bcdd32bccd50758a1b21ac303efe0d0c8e931bdcd7dad
7
- data.tar.gz: c97d5e0c0fe34c5ca963afbef21b59dcb6a086826fc1ca4035c224e750f0884bee79a1521876016ae2d44b51d3da44f2b91eaca92bee024eeee35c557ea7d027
6
+ metadata.gz: 59341231d056722c66edce1db4df2da6e51c98f3deadc719ab8198503a93657cb9e0ecb780c2a0ece9a944c7fdcb041119aec1bdb38a73c79711fb637adcdbc1
7
+ data.tar.gz: 460d313ab386c8ce6162e854225ae25de62ec1f4a34bd23c4e26c969cb98b392db6ac33305592dc403dd6624ff85f88b2c4fb129bdc042da73132017d39f658d
data/lib/ws_client.rb CHANGED
@@ -82,7 +82,7 @@ module WsClient
82
82
  def close
83
83
  return if @closed
84
84
 
85
- send_data nil, :type => :close if !@pipe_broken
85
+ send_data nil, MS_2, :type => :close if !@pipe_broken
86
86
  emit :close
87
87
  ensure
88
88
  @closed = true
@@ -190,8 +190,14 @@ module WsClient
190
190
 
191
191
  class AsyncClient < ::WsClient::Client
192
192
  def close
193
- super
193
+ return if @closed
194
+
195
+ send_data nil, :type => :close if !@pipe_broken
196
+ emit :close
194
197
  ensure
198
+ @closed = true
199
+ @socket.close if @socket
200
+ @socket = nil
195
201
  Thread.kill @thread if @thread
196
202
  end
197
203
 
@@ -1,3 +1,3 @@
1
1
  module WsClient
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
4
+ version: 0.1.3
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-18 00:00:00.000000000 Z
12
+ date: 2016-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler