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



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

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



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

alias :thin_stop :stop