Method: Net::SSH::Connection::Channel#on_open_failed

Defined in:
lib/net/ssh/connection/channel.rb

#on_open_failed(&block) ⇒ Object

Registers a callback to be invoked when the server was unable to open the requested channel. The channel itself will be passed to the block, along with the integer “reason code” for the failure, and a textual description of the failure from the server.

channel = session.open_channel do |ch|
  # ..
end

channel.on_open_failed { |ch, code, desc| ... }


410
411
412
413
# File 'lib/net/ssh/connection/channel.rb', line 410

def on_open_failed(&block)
  old, @on_open_failed = @on_open_failed, block
  old
end