Class: Mockingbird::Commands::Close

Inherits:
Command
  • Object
show all
Defined in:
lib/mockingbird/commands.rb

Instance Attribute Summary

Attributes inherited from Command

#callback, #next_command

Instance Method Summary collapse

Methods inherited from Command

#advance, #initialize

Constructor Details

This class inherits a constructor from Mockingbird::Commands::Command

Instance Method Details

#run(conn) ⇒ Object



79
80
81
82
83
84
85
# File 'lib/mockingbird/commands.rb', line 79

def run(conn)
  conn.send_terminal_chunk
  EM.add_timer(0.1) do
    conn.close_connection
  end
  advance(conn)
end