ione 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ione/io/base_connection.rb +5 -2
- data/lib/ione/io/connection.rb +0 -1
- data/lib/ione/io/server_connection.rb +0 -1
- data/lib/ione/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 166255b7792cfb6e2692c28ecd819874eecec4b5
|
4
|
+
data.tar.gz: c12c7574df507268a02c86b87924a9d7bea0c405
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6252fe2dcd04eda59a758bcf3959068bc466cab12d8794f04f95a91db2a8c6f76bbf8f38003459082be7a36ed708283a20281974c6a439b21f51dac08c22ec
|
7
|
+
data.tar.gz: 1ed5e64c259493d2321aebd7298da66a5b02952740942c9aa5b5edfe65596def5777443700d5ce2e0c4142cb8bd42007afff280f84a5673f5c7f9a283f9ee57f
|
@@ -9,6 +9,7 @@ module Ione
|
|
9
9
|
@host = host
|
10
10
|
@port = port
|
11
11
|
@state = :connecting
|
12
|
+
@lock = Mutex.new
|
12
13
|
@closed_promise = Promise.new
|
13
14
|
end
|
14
15
|
|
@@ -16,7 +17,10 @@ module Ione
|
|
16
17
|
#
|
17
18
|
# @return [true, false] returns false if the connection was already closed
|
18
19
|
def close(cause=nil)
|
19
|
-
|
20
|
+
@lock.synchronize do
|
21
|
+
return false if @state == :closed
|
22
|
+
@state = :closed
|
23
|
+
end
|
20
24
|
if @io
|
21
25
|
begin
|
22
26
|
@io.close
|
@@ -25,7 +29,6 @@ module Ione
|
|
25
29
|
# nothing to do, the socket was most likely already closed
|
26
30
|
end
|
27
31
|
end
|
28
|
-
@state = :closed
|
29
32
|
if cause
|
30
33
|
@closed_promise.fail(cause)
|
31
34
|
else
|
data/lib/ione/io/connection.rb
CHANGED
data/lib/ione/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ione
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Reactive programming framework for Ruby, painless evented IO, futures
|
14
14
|
and an efficient byte buffer
|
@@ -18,7 +18,7 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- .yardopts
|
21
|
+
- ".yardopts"
|
22
22
|
- README.md
|
23
23
|
- lib/ione.rb
|
24
24
|
- lib/ione/byte_buffer.rb
|
@@ -51,17 +51,17 @@ require_paths:
|
|
51
51
|
- lib
|
52
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 1.9.3
|
57
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.2.
|
64
|
+
rubygems_version: 2.2.2
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Reactive programming framework for Ruby
|