libuv 0.11.18 → 0.11.19
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/libuv/loop.rb +0 -3
- data/lib/libuv/pipe.rb +10 -4
- data/lib/libuv/tcp.rb +12 -9
- data/lib/libuv/timer.rb +3 -9
- data/lib/libuv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 336a0c0476d19190a108a8e7be9513be3d5f3446
|
4
|
+
data.tar.gz: 5fcd039e7c42068f1bcfbea5ba3db0020cc049d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5fbb307e019c62bee59aaab8caf46cccd36876a7a257788c7e2b9df23ae3f9bedfb700240359d8409138a9b2868e301e042fd32876724c66a688f4b9ea944d0
|
7
|
+
data.tar.gz: 2ad9a28a82f81be518a72d276d5de1dc215ac1253392915e4fb6fb460d066dc6b5ddecf0026c29d64e0be98293c38b1eaeab2afe880c50672887ccf877361edf
|
data/lib/libuv/loop.rb
CHANGED
data/lib/libuv/pipe.rb
CHANGED
@@ -138,10 +138,16 @@ module Libuv
|
|
138
138
|
|
139
139
|
def on_connect(req, status)
|
140
140
|
::Libuv::Ext.free(req)
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
141
|
+
e = check_result(status)
|
142
|
+
|
143
|
+
if e
|
144
|
+
reject(e)
|
145
|
+
else
|
146
|
+
begin
|
147
|
+
@callback.call(self)
|
148
|
+
rescue Exception => e
|
149
|
+
@loop.log :error, :pipe_connect_cb, e
|
150
|
+
end
|
145
151
|
end
|
146
152
|
end
|
147
153
|
|
data/lib/libuv/tcp.rb
CHANGED
@@ -129,10 +129,7 @@ module Libuv
|
|
129
129
|
|
130
130
|
alias_method :do_shutdown, :shutdown
|
131
131
|
def shutdown
|
132
|
-
|
133
|
-
if @tls.nil?
|
134
|
-
do_shutdown
|
135
|
-
elsif @handshake == false && @pending_writes.length > 0
|
132
|
+
if @pending_writes && @pending_writes.length > 0
|
136
133
|
@pending_writes[-1][0].finally method(:do_shutdown)
|
137
134
|
else
|
138
135
|
do_shutdown
|
@@ -256,12 +253,18 @@ module Libuv
|
|
256
253
|
|
257
254
|
def on_connect(req, status)
|
258
255
|
::Libuv::Ext.free(req)
|
259
|
-
|
256
|
+
e = check_result(status)
|
260
257
|
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
@
|
258
|
+
if e
|
259
|
+
reject(e)
|
260
|
+
else
|
261
|
+
@connected = true
|
262
|
+
|
263
|
+
begin
|
264
|
+
@callback.call(self)
|
265
|
+
rescue Exception => e
|
266
|
+
@loop.log :error, :connect_cb, e
|
267
|
+
end
|
265
268
|
end
|
266
269
|
end
|
267
270
|
|
data/lib/libuv/timer.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
module Libuv
|
2
2
|
class Timer < Handle
|
3
|
-
include Assertions
|
4
|
-
|
5
|
-
|
6
|
-
TIMEOUT_ERROR = "timeout must be an Integer".freeze
|
7
|
-
REPEAT_ERROR = "repeat must be an Integer".freeze
|
8
|
-
|
9
3
|
|
10
4
|
# @param loop [::Libuv::Loop] loop this timer will be associated
|
11
5
|
# @param callback [Proc] callback to be called when the timer is triggered
|
@@ -27,8 +21,8 @@ module Libuv
|
|
27
21
|
return if @closed
|
28
22
|
@stopped = false
|
29
23
|
|
30
|
-
|
31
|
-
|
24
|
+
timeout = timeout.to_i
|
25
|
+
repeat = repeat.to_i
|
32
26
|
|
33
27
|
error = check_result ::Libuv::Ext.timer_start(handle, callback(:on_timer), timeout, repeat)
|
34
28
|
reject(error) if error
|
@@ -52,7 +46,7 @@ module Libuv
|
|
52
46
|
# Updates the repeat timeout
|
53
47
|
def repeat=(repeat)
|
54
48
|
return if @closed
|
55
|
-
|
49
|
+
repeat = repeat.to_i
|
56
50
|
check_result ::Libuv::Ext.timer_set_repeat(handle, repeat)
|
57
51
|
reject(error) if error
|
58
52
|
end
|
data/lib/libuv/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libuv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bulat Shakirzyanov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|