arachni-rpc-em 0.1.3.pre1 → 0.1.3.pre2
Sign up to get free protection for your applications and to get access to all the features.
@@ -231,7 +231,14 @@ class Client
|
|
231
231
|
def call_async( req, &block )
|
232
232
|
::EM.next_tick {
|
233
233
|
req.callback = block if block_given?
|
234
|
-
|
234
|
+
|
235
|
+
begin
|
236
|
+
connect.send_request( req )
|
237
|
+
rescue ::EM::ConnectionError => e
|
238
|
+
exc = ConnectionError.new( e.to_s + " for '#{@host}:#{@port}'." )
|
239
|
+
exc.set_backtrace( e.backtrace )
|
240
|
+
req.callback.call exc
|
241
|
+
end
|
235
242
|
}
|
236
243
|
end
|
237
244
|
|
@@ -30,7 +30,13 @@ describe Arachni::RPC::EM::Client do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should throw error when connecting to inexistent server" do
|
33
|
-
start_client( rpc_opts.merge( :port =>
|
33
|
+
start_client( rpc_opts.merge( :host => 'dddd', :port => 999339 ) ).call( 'test.foo', @arg ) do |res|
|
34
|
+
res.rpc_connection_error?.should be_true
|
35
|
+
::EM.stop
|
36
|
+
end
|
37
|
+
Arachni::RPC::EM.block
|
38
|
+
|
39
|
+
start_client( rpc_opts.merge( :port => 999339 ) ).call( 'test.foo', @arg ) do |res|
|
34
40
|
res.rpc_connection_error?.should be_true
|
35
41
|
::EM.stop
|
36
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arachni-rpc-em
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.3.
|
4
|
+
version: 0.1.3.pre2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|