# File lib/rubytorrent/server.rb, line 88
  def shutdown
    return if @shutdown
    @shutdown = true
    @server.close rescue nil

    @thread.join(0.2)
    @controllers.each { |hash, cont| cont.shutdown }
    self
  end