digital-transport 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/digital/transport/adapters/tcp.rb +6 -2
- data/lib/digital/transport/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebc66bca4fa184489e9e3150ffe00fcc1cc14d26
|
4
|
+
data.tar.gz: 43e9b5b2de33c6fc647a300e1a6228386b824684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 395e76d6e3d347c611c798b4078481b18e52f4971ef3cb582a237933f970a0c7b6330e7e05abea3ca234511f1ae490bfeab7577232ad08d2a86f2d0853cd2459
|
7
|
+
data.tar.gz: fb9c67b12c6cb9a2a5ee19a9c586a7bb30e01d50c0b1d35938fda3b71f8787b21c1503cdcb09a7898038b897fb0b58605dbcea2e9ba5dd13ca8cca34be291785
|
@@ -97,15 +97,19 @@ module Digital
|
|
97
97
|
def connect_nonblock(io_like, endpoint, timeout)
|
98
98
|
# IO.connect_nonblock retrun value is different across multiple platform.
|
99
99
|
io_like.connect_nonblock(endpoint)
|
100
|
-
|
100
|
+
raise Errno::EISCONN
|
101
101
|
rescue Errno::EINPROGRESS # connection in progress, wait a bit.
|
102
102
|
IO.select(nil, [io_like], nil, timeout) ? retry : nil
|
103
103
|
rescue Errno::EISCONN # The socket is already connected.
|
104
|
-
|
104
|
+
init_io io_like
|
105
105
|
Either.right(self)
|
106
106
|
rescue => ex
|
107
107
|
Either.left(ex)
|
108
108
|
end
|
109
|
+
|
110
|
+
def init_io(io)
|
111
|
+
@io = io
|
112
|
+
end
|
109
113
|
end
|
110
114
|
end
|
111
115
|
end
|