tamashii-manager 0.2.1 → 0.2.2

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: 7513e1d4a1084d008197e4b78e9629ac357149c3
4
- data.tar.gz: 8acf820bf7f066b2d7ccd70ae837fbe87e7c98cc
3
+ metadata.gz: 63369a8bf4cc671bf3714013b73f6bfdab72ab31
4
+ data.tar.gz: 3fa3390cba46454785be013b96405830a0484493
5
5
  SHA512:
6
- metadata.gz: 85ccc4fc0d53b292cd10a38fdda324ba351ff2be3d4b70b6fb4263b0c5c9c1c399f189fafeaa961882e05008a0c1e6f08355d4bcbf6dc6a5ba0daf7529be50eb
7
- data.tar.gz: b2be4012b85567b33265de094b056b37455204763ee85bd13d311b038d84e6a14ecc8eb8b8c618a8a907e1ccd9d654d66d51f2d4452b7c8d9b76817f1230fe4b
6
+ metadata.gz: 4ffa1749eab9fbf2b1f43d8038658b23be3161db0d8bc3d3cc81335d91a44b52f3f9f92dfca6d924665d785763683c2344cd322c3f7342cfc1940cf1a030f527
7
+ data.tar.gz: cd714954880cf7eec9ded1932eca5ba0f96e118ec3c3eaf89af14a418d07eda79b6bc4a0b81d41fd0dd70c5f4f428715879eed3ccda8bca204dad7a36a2bcd49
@@ -78,7 +78,7 @@ module Tamashii
78
78
 
79
79
  def on_close
80
80
  Manager.logger.info("Client #{id} closed connection")
81
- Client[id] = nil
81
+ Client.remove_client(id)
82
82
  end
83
83
 
84
84
  def emit_error(message)
@@ -9,7 +9,7 @@ module Tamashii
9
9
  other.class_eval do
10
10
  class << self
11
11
  def accepted_clients
12
- @accepted_clients ||= {}
12
+ @accepted_clients ||= Concurrent::Hash.new
13
13
  end
14
14
 
15
15
  def [](name)
@@ -22,6 +22,10 @@ module Tamashii
22
22
  accepted_clients[name.to_s] = client
23
23
  end
24
24
 
25
+ def remove_client(name)
26
+ accepted_clients.delete(name)
27
+ end
28
+
25
29
  def send_to(id, packet)
26
30
  Manager.server.pubsub.send_to(id, packet)
27
31
  end
@@ -15,7 +15,6 @@ module Tamashii
15
15
  end
16
16
 
17
17
  def call(env)
18
- setup_heartbeat_timer
19
18
  super
20
19
  end
21
20
 
@@ -1,5 +1,5 @@
1
1
  module Tamashii
2
2
  module Manager
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tamashii-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2017-05-31 00:00:00.000000000 Z
13
+ date: 2017-07-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: puma