em-ssh 0.4.0 → 0.4.1
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.
- data/lib/em-ssh/connection.rb +9 -1
- data/lib/em-ssh/version.rb +1 -1
- data/lib/em-ssh.rb +1 -0
- metadata +2 -2
data/lib/em-ssh/connection.rb
CHANGED
@@ -129,14 +129,16 @@ module EventMachine
|
|
129
129
|
|
130
130
|
begin
|
131
131
|
on(:connected) do |session|
|
132
|
+
@connected = true
|
132
133
|
succeed(session, @host)
|
133
134
|
end
|
134
135
|
on(:error) do |e|
|
135
136
|
fail(e)
|
136
137
|
close_connection
|
137
138
|
end
|
139
|
+
|
138
140
|
@nocon = on(:closed) do
|
139
|
-
fail(
|
141
|
+
fail(ConnectionFailed.new(@host))
|
140
142
|
close_connection
|
141
143
|
end
|
142
144
|
@contimeout = EM::Timer.new(@timeout) do
|
@@ -144,6 +146,12 @@ module EventMachine
|
|
144
146
|
close_connection
|
145
147
|
end
|
146
148
|
|
149
|
+
@nonego = on(:closed) do
|
150
|
+
fail(ConnectionTerminated.new(@host))
|
151
|
+
close_connection
|
152
|
+
end
|
153
|
+
on(:version_negotiated) { @nonego.cancel }
|
154
|
+
|
147
155
|
@error_callback = lambda do |code|
|
148
156
|
fail(SshError.new(code))
|
149
157
|
close_connection
|
data/lib/em-ssh/version.rb
CHANGED
data/lib/em-ssh.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
prerelease:
|
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
|
+
date: 2012-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|