Class: Thin::Backends::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/mail_catcher/web/application.rb

Overview

Faye’s adapter isn’t smart enough to close websockets when thin is stopped, so we teach it to do so.

Instance Method Summary collapse

Instance Method Details

#stopObject



20
21
22
23
24
25
26
27
# File 'lib/mail_catcher/web/application.rb', line 20

def stop
  thin_stop
  @connections.each_value do |connection|
    if connection.socket_stream
      connection.socket_stream.close_connection_after_writing
    end
  end
end

#thin_stopObject



18
# File 'lib/mail_catcher/web/application.rb', line 18

alias :thin_stop :stop