async 1.15.3 → 1.15.4

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
  SHA256:
3
- metadata.gz: f1d8ef7fbe5fb3a4f0f2a26d992abd86f5b682b7f1e400fe28cf6407eaa65fb1
4
- data.tar.gz: 879eb59f05f3195af21f83018e043f808077710e8d527684e715cf52124d4d11
3
+ metadata.gz: a3754f6b9b83b39f95409fe1475169515918ea4989bf804516a499e2acc0ce8c
4
+ data.tar.gz: febf03b7a3c0da61b2719fc121864d8bef419bbeeec7a7e3885498f465b9254c
5
5
  SHA512:
6
- metadata.gz: 3c6b8aa080c13320200b17953e5a0f51bedbefcdaeb3c21df0d0e9d52c2ae81c0ec9d3b81e292a9890d3cb44352b93b3b8fdd3c7446de59610af36eb1498848d
7
- data.tar.gz: d5c08e906390930a34e0439f9077481a139181871ad7ab49b81b2a2f8752e9a02d32520c246c6be5ed2d9e3ff578a317676635fa610fd798e66a550ee5251ae6
6
+ metadata.gz: 89d19e82a283cafd34436cc646b2671b54c1e22f0296ef8a338ae2235b3d4b40048bbe6f850086ff489ac73f2a62e61ac80e96238e9b6b8fa64d1dd10db98ee7
7
+ data.tar.gz: 19642a606b60ab0f18e69afb65dc84df82bcd38137153f45f3850f429379627a4ece569278e6c39a6ef12810bc995127d5c20e69ef575a697f49020d7920d9b6
@@ -25,6 +25,12 @@ require 'nio'
25
25
 
26
26
  module Async
27
27
  module Debug
28
+ class LeakError < RuntimeError
29
+ def initialize(monitors)
30
+ super "Trying to close selector with active monitors: #{monitors.inspect}! This may cause your socket or file descriptor to leak."
31
+ end
32
+ end
33
+
28
34
  class Selector
29
35
  def initialize(selector = NIO::Selector.new)
30
36
  @selector = selector
@@ -67,7 +73,7 @@ module Async
67
73
 
68
74
  def close
69
75
  if @monitors.any?
70
- raise RuntimeError, "Trying to close selector with active monitors: #{@monitors.values.inspect}!"
76
+ raise LeakError, @monitors.values
71
77
  end
72
78
  ensure
73
79
  @selector.close
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Async
22
- VERSION = "1.15.3"
22
+ VERSION = "1.15.4"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.3
4
+ version: 1.15.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams